Coder Social home page Coder Social logo

sparktuner's Introduction

Spark Tuner

Build Status Coverage Status Maintainability

Objectives:

  • Tune Spark configuration parameters in a hands-off manner
  • Learn from tuning experiences over time to:
    • Tune more efficiently over time,
    • Answer counterfactual questions about application performance, and
    • Suggest interventions to improve application performance (potentially even code changes or environment updates apart from configuration setting)

Setup, build, and usage

Setup

This package assumes that Apache Spark is installed, and the following environment variables have already been set: SPARK_HOME, and, optionally, HADOOP_CONF_DIR. See dev-README.md for details.

All Python dependencies are listed in:

  • requirements.txt
  • build.gradle
  • setup.py

Build

  • ./gradlew clean build to download and install all dependencies from scratch, and run tests.
  • ./gradlew flake8 to lint for style issues.
  • ./gradlew pytest to run tests.
  • ./gradlew build -x getRequirements to install all dependencies (assumes they've already been downloaded).

Some interesting build artifacts are:

  • build/deployable/bin/sparktuner
  • build/deployable/bin/sparktuner.pex
  • build/distributions/sparktuner-0.1.0.tar.gz
  • build/wheel-cache/sparktuner-0.1.0-py2-none-any.whl

The Python virtual environment resides in build/venv, and can be activated using source build/venv/bin/activate and deactivated using deactivate.

Usage

To see usage information, ./build/deployable/bin/sparktuner --help

Sample commands:

  • build/deployable/bin/sparktuner --no-dups --name sartre_spark_sortre --path ../../sparkScala/sort/build/libs/sort-0.1-all.jar --deploy_mode client --master "local[*]" --class com.umayrh.sort.Main --spark_parallelism "1,10" --program_conf "10000 /tmp/sparktuner_sort"

  • build/deployable/bin/sparktuner --no-dups --name sartre_spark_sortre --path ../../sparkScala/sort/build/libs/sort-0.1-all.jar --deploy_mode client --master "local[*]" --class com.umayrh.sort.Main --executor_memory "50mb,1gb" --program_conf "10000 /tmp/sparktuner_sort"

  • build/deployable/bin/sparktuner --no-dups --name sartre_spark_sortre --path ../../sparkScala/sort/build/libs/sort-0.1-all.jar --deploy_mode client --master "local[*]" --class com.umayrh.sort.Main --driver_memory "1GB,6GB" --program_conf "1000000 /tmp/sparktuner_sort"

sparktuner's People

Contributors

jchaskell avatar umayrh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

angelzhan

sparktuner's Issues

Remove dependency on the package 'humanfriendly'

Is your feature request related to a problem? Please describe.
Generally, it's desirable to keep package dependencies as lean as possible. We use humanfriendly to parse a strings like "50b", "100kb", and "250mb" and convert them to integer values. We should be able to remove this dependency by implementing the parse_size() function in util.py (see here).

Describe the solution you'd like
An implementation of parse_size in util.py and corresponding tests in test_util.py.

Integrate CodeClimate's test coverage

Is your feature request related to a problem? Please describe.
We use Coveralls for analyzing test coverage but it would be nice to also enable CodeClimate.

Here are some useful links:

Afterwards, you can add CodeClimate's test coverage badge by adding the following line to README.md:

[![Test Coverage](https://api.codeclimate.com/v1/badges/1b9ae406a6e8b922405a/test_coverage)](https://codeclimate.com/github/umayrh/sparktuner/test_coverage)

Improve code coverage to >85%

Is your feature request related to a problem? Please describe.
The current test coverage can easily be improved on. See this for Coverall's current coverage analysis.

Describe the solution you'd like
Coveralls reports an overall 85% percent coverage. It'd be nice if the coverage is also at least 50% for each module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.