Apache Submarine is an Apache2 License Software.
Contributing to Submarine (Source code, Documents, Image, Website) means you agree to the Apache2 License.
Before you start, please read the Code of Conduct carefully, familiarize yourself with it and refer to it whenever you need it.
For those of you who are not familiar with Apache project, understanding How it works would be quite helpful.
When creating a Pull Request, you will automatically get the template below.
Filling it thoroughly can improve the speed of the review process.
### What is this PR for? A few sentences describing the overall goals of the pull request's commits. First time? Check out the contribution guidelines - https://submarine.apache.org/contribute.html ### What type of PR is it? [Bug Fix | Improvement | Feature | Documentation | Hot Fix | Refactoring] ### Todos * [ ] - Task ### What is the Jira issue? * Open an issue on Jira https://issues.apache.org/jira/browse/SUBMARINE/ * Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg. [SUBMARINE-533] ### How should this be tested? Outline the steps to test the PR here. ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? * Is there breaking changes for older versions? * Does this needs documentation?
You can also test and review a particular Pull Request. Here are two useful ways.
Using a utility provided from Submarine.
dev/test_submarine_pr.py [# of PR]
For example, if you want to test #513
, then the command will be:
dev/test_submarine_pr.py 513
Another way is using github/hub.
hub checkout https://github.com/apache/submarine/pull/[# of PR]
The above two methods will help you test and review Pull Requests.
Submarine follows [Fork & Pull] (https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki/Development-workflow-with-Git:-Fork,-Branching,-Commits,-and-Pull-Request) model.
When a Pull Request is submitted, it is being merged or rejected by the following review process.
The PMC adds new committers from the active contributors, based on their contribution to Submarine.
The qualifications for new committers include:
Here are some things you will need to build and test Submarine.
submarine uses Git for its SCM system. so you'll need git client installed in your development machine.
You are free to use whatever IDE you prefer, or your favorite command line editor.
We are following Google Code style:
There are some plugins to format, lint your code in IDE (use _tools/checkstyle.xml as rules)
Checkstyle report location is in ${submodule}/target/site/checkstyle.html
Test coverage report location is in ${submodule}/target/site/cobertura/index.html
First of all, you need the Submarine source code.
The official location for Submarine is http://git.apache.org/submarine.git.
Get the source code on your development machine using git.
git clone git://git.apache.org/submarine.git submarine
You may also want to develop against a specific branch. For example, for branch-0.5.6
git clone -b branch-0.5.6 git://git.apache.org/submarine.git submarine
or with write access
git clone https://git-wip-us.apache.org/repos/asf/submarine.git
If you want not only build Submarine but also make change, then you need fork Submarine github mirror repository and make a pull request.
To build the code, install
mvn install
To skip test
mvn install -DskipTests
To build with specific spark / hadoop version
mvn install -Phadoop-2.2 -Dhadoop.version=2.2.0 -Pspark-1.3 -Dspark.version=1.3.0
Each new File should have its own accompanying unit tests. Each new interpreter should have come with its tests.
submarine has 3 types of tests:
Currently the GUI integration tests are not run in the Maven and are only run in the CI environment when the pull request is submitted to github.
Make sure to watch the [CI results] (https://travis-ci.org/apache/submarine/pull_requests) for your pull request.
PATH=~/Applications/Firefox.app/Contents/MacOS/:$PATH CI="true" mvn verify -Pspark-1.6 -Phadoop-2.3 -Ppyspark -B -pl "submarine-interpreter,submarine-zengine,submarine-server,submarine-display,spark-dependencies,spark" -Dtest="org.apache.submarine.AbstractFunctionalSuite" -DfailIfNoTests=false
This allows you to target a specific GUI integration test.
TEST_SELENIUM="true" mvn package -DfailIfNoTests=false -pl 'submarine-interpreter,submarine-zengine,submarine-server' -Dtest=ParagraphActionsIT
submarine project‘s CI system will collect information from pull request author’s travis-ci and display status in the pull request.
Each individual contributor should setup travis-ci for the fork before making a pullrequest. Go to https://travis-ci.org/profile and switch on ‘submarine’ repository.
cd submarine-server HADOOP_HOME=YOUR_HADOOP_HOME JAVA_HOME=YOUR_JAVA_HOME mvn exec:java -Dexec.mainClass="org.apache.submarine.server.submarineServer" -Dexec.args=""
or use daemon script
bin/submarine-daemon start
Server will be run on http://localhost:8080