Skip to content

Commit 7126ee2

Browse files
committed
Merge branch 'master' into spark-2.0-preview
2 parents bd2ebfd + 7a7d670 commit 7126ee2

27 files changed

+263
-27
lines changed

.github/PULL_REQUEST_TEMPLATE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
**Pull Request checklist**
2+
3+
- [ ] The commit(s) message(s) follows the contribution [guidelines](doc/contribution-guidelines.md#commit-message-format) ?
4+
- [ ] Tests for the changes have been added (for bug fixes / features) ?
5+
- [ ] Docs have been added / updated (for bug fixes / features) ?
6+
7+
**Current behavior :** (link exiting issues here : https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests)
8+
9+
10+
11+
**New behavior :**
12+
13+
14+
15+
**BREAKING CHANGES**
16+
17+
If this PR contains a breaking change, please describe the impact and migration
18+
path for existing applications.
19+
If not please remove this section.
20+
21+
**Other information**:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Spark Job Server is now included in Datastax Enterprise 4.8!
116116
| 0.7.0 | 1.6.2 |
117117
| spark-2.0-preview | 2.1.0 |
118118

119-
For release notes, look in the `notes/` directory. They should also be up on [notes.implicit.ly](http://notes.implicit.ly/search/spark-jobserver).
119+
For release notes, look in the `notes/` directory.
120120

121121
If you need non-released jars, please visit [Jitpack](https://jitpack.io) - they provide non-release jar builds for any Git repo. :)
122122

@@ -759,7 +759,7 @@ This can be used to quickly develop python applications that can interact with
759759
Spark Jobserver programmatically.
760760
761761
## Contribution and Development
762-
Contributions via Github Pull Request are welcome. See the TODO for some ideas.
762+
Contributions via Github Pull Request are welcome. Please start by taking a look at the [contribution guidelines](doc/contribution-guidelines.md) and check the TODO for some contribution ideas.
763763
764764
- If you need to build with a specific scala version use ++x.xx.x followed by the regular command,
765765
for instance: `sbt ++2.11.6 job-server/compile`

akka-app/src/test/scala/spark/jobserver/common/akka/ActorMetricsSpec.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package spark.jobserver.common.akka
22

3-
import org.scalatest.matchers.ShouldMatchers
43
import org.scalatest.{Matchers, FunSpec}
54
import akka.testkit.TestActorRef
65

@@ -19,4 +18,4 @@ class ActorMetricsSpec extends FunSpec with Matchers {
1918
actor.metricReceiveTimer.count should equal (1)
2019
}
2120
}
22-
}
21+
}

akka-app/src/test/scala/spark/jobserver/common/akka/ActorStackSpec.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package spark.jobserver.common.akka
22

3-
import org.scalatest.matchers.ShouldMatchers
43
import org.scalatest.{Matchers, FunSpec}
54
import akka.testkit.TestActorRef
65

build.sbt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Dependencies._
33
import JobServerRelease._
44

5-
transitiveClassifiers in Global := Seq()
5+
transitiveClassifiers in Global := Seq(Artifact.SourceClassifier)
66
lazy val dirSettings = Seq()
77

88
lazy val akkaApp = Project(id = "akka-app", base = file("akka-app"))
@@ -120,7 +120,8 @@ lazy val jobServerTestJarSettings = Seq(
120120

121121
lazy val noPublishSettings = Seq(
122122
publishTo := Some(Resolver.file("Unused repo", file("target/unusedrepo"))),
123-
publishArtifact := false
123+
publishArtifact := false,
124+
publish := {}
124125
)
125126

126127
lazy val dockerSettings = Seq(
@@ -150,6 +151,16 @@ lazy val dockerSettings = Seq(
150151
apt-get -y install mesos=${MESOS_VERSION} && \
151152
apt-get clean
152153
""")
154+
env("MAVEN_VERSION","3.3.9")
155+
runRaw(
156+
"""mkdir -p /usr/share/maven /usr/share/maven/ref \
157+
&& curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \
158+
| tar -xzC /usr/share/maven --strip-components=1 \
159+
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
160+
""")
161+
env("MAVEN_HOME","/usr/share/maven")
162+
env("MAVEN_CONFIG", "/.m2")
163+
153164
copy(artifact, artifactTargetPath)
154165
copy(baseDirectory(_ / "bin" / "server_start.sh").value, file("app/server_start.sh"))
155166
copy(baseDirectory(_ / "bin" / "server_stop.sh").value, file("app/server_stop.sh"))

doc/contribution-guidelines.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Contribution guidelines
2+
3+
- [Pull Requests](#pullrequest)
4+
- [Commit Message Guidelines](#commit)
5+
6+
## <a name="pullrequest"></a> Pull Requests Guidelines
7+
Pull requests are the only means by which you can contribute to this project, please follow the following steps when submitting pull requests :
8+
9+
1. Create your pull request. (PR name must match [commit name](#commit))
10+
2. Fill the pull request template with all of the required elements
11+
3. CI tests kick in and report back any issues, you should fix these issues before continuing.
12+
4. The reviewer(s) uses Github review system so you will know if the reviewer requested any changes, approved the Pull Request or simply added comments.
13+
5. If any changes are requested please fix them and then once you are ready ask for a new review
14+
15+
## <a name="commit"></a> Git Commit Guidelines
16+
17+
### Commit Message Format
18+
A commit message is made up of a **header**, a **body** and a **footer**. The header has a special
19+
format that includes a **type**, a **scope** and a **subject**:
20+
21+
```
22+
<type>(<scope>): <subject>
23+
<BLANK LINE>
24+
<body>
25+
<BLANK LINE>
26+
<footer>
27+
```
28+
29+
* The **header** and **scope** are mandatory
30+
* Lines shouldn't exceed 100 characters
31+
32+
#### Type
33+
Must be one of the following:
34+
35+
* **feat**: A new feature
36+
* **fix**: A bug fix
37+
* **refactor**: Refactoring change
38+
* **docs**: Documentation only changes
39+
* **style**: Style changes (white-space, formatting, missing semi-colons, etc)
40+
* **test**: Adding missing tests
41+
* **misc**: Changes to the build process or auxiliary tools and libraries
42+
43+
#### Scope
44+
The scope sets the scope of the commit, for example `webapi`, `akka-app`, `doa`, etc...
45+
46+
#### Subject
47+
Brief commit description
48+
49+
* use the imperative, present tense: "change" not "changed" nor "changes"
50+
* don't capitalize first letter
51+
* no dot (.) at the end
52+
53+
#### Body
54+
Extended commit description and just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
55+
The body should include the motivation for the change and contrast this with previous behaviour if any.
56+
57+
#### Footer
58+
59+
* any information about **Breaking Changes**
60+
61+
**Breaking Changes** should start with the word `BREAKING CHANGES:` followed by a new line and a list of breaking changes.
62+
63+
#### Examples
64+
65+
```
66+
feat(akka-app): change message serialization format
67+
68+
* Add new serialization format
69+
* Add serialization tests
70+
* Document the changes
71+
72+
BEARKING CHANGES :
73+
* Not compatible with 0.7.0
74+
```
75+
76+
---
77+
78+
```
79+
doc(webapi): add new routes documentation
80+
81+
* Document all new routes
82+
* Add exmaple snippets
83+
* Remove obselete links
84+
85+
```
86+
87+
---
88+
89+
```
90+
fix(webapi): fix webapi timeout
91+
```
92+
93+
---
94+
95+
```
96+
misc(ci): add new CI tests
97+
```

doc/docker.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Spark-jobserver is available as a Docker container! This might be the easiest w
44

55
To get started:
66

7-
docker run -d -p 8090:8090 velvia/spark-jobserver:0.6.2.mesos-0.28.1.spark-1.6.1
7+
docker run -d -p 8090:8090 sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2
88

99
This will start job server on port 8090 in a container, with H2 database and Mesos support, and expose that port to the host on which you run the container.
1010

@@ -16,13 +16,13 @@ By default, the container has an embedded Spark distro and runs using Spark loca
1616

1717
To change the spark master the container runs against, set SPARK_MASTER when you start the container:
1818

19-
docker run -d -p 8090:8090 -e SPARK_MASTER=mesos://zk://mesos.master:5050 velvia/spark-jobserver:0.6.2.mesos-0.28.1.spark-1.6.1
19+
docker run -d -p 8090:8090 -e SPARK_MASTER=mesos://zk://mesos.master:5050 sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2
2020

2121
You can easily change the amount of memory job server uses with `JOBSERVER_MEMORY`, or replace the entire config job server uses at startup with `JOBSERVER_CONFIG`.
2222

2323
The standard way to replace the config is to derive a custom Docker image from the job server one by overwriting the default config at `app/docker.conf`. The Dockerfile would look like this:
2424

25-
from velvia/spark-jobserver:0.6.2.mesos-0.28.1.spark-1.6.1
25+
from sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2
2626
add /path/to/my/jobserver.conf /app/docker.conf
2727

2828
Similarly, to change the logging configuration, inherit from this container and overwrite `/app/log4j-server.properties`.
@@ -31,15 +31,15 @@ Similarly, to change the logging configuration, inherit from this container and
3131

3232
Any `spark-submit` arguments can be passed to the tail of the `docker run` command. A very common use of this is to add custom jars to your Spark job environment. For example, to add the Datastax Spark-Cassandra Connector to your job:
3333

34-
docker run -d -p 8090:8090 velvia/spark-jobserver:0.6.2.mesos-0.28.1.spark-1.6.1 --packages com.datastax.spark:spark-cassandra-connector_2.10:1.6.1
34+
docker run -d -p 8090:8090 sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2 --packages com.datastax.spark:spark-cassandra-connector_2.10:1.6.1
3535

3636
## Database, Persistence, Logs
3737

3838
Docker containers are usually stateless, but it wouldn't be very useful to have the jars and job config reset every time you had to kill and restart a container.
3939

4040
The job server docker image is configured to use H2 database by default and to write the database to a Docker volume at `/database`, which will be persisted between container restarts, and can even be shared amongst multiple job server containers on the same host. Note that in order to persist them to new containers, you need to create a local directory, something like this:
4141

42-
docker run -d -p 8090:8090 -v /opt/job-server-db:/database velvia/spark-jobserver:0.6.2.mesos-0.28.1.spark-1.6.1
42+
docker run -d -p 8090:8090 -v /opt/job-server-db:/database sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2
4343

4444
See the [Docker Volumes Guide](http://docs-stage.docker.com/userguide/dockervolumes/#volume) for more info.
4545

@@ -61,7 +61,7 @@ Example Marathon config, thanks to @peterklipfel:
6161
"container": {
6262
"type": "DOCKER",
6363
"docker": {
64-
"image": "velvia/spark-jobserver:0.6.2.mesos-0.28.1.spark-1.6.1",
64+
"image": "sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2",
6565
"network": "BRIDGE",
6666
"portMappings": [{
6767
"containerPort": 8090,

doc/troubleshooting.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ If your job returns a large job result, it may exceed Akka's maximum network mes
3939

4040
On jobs with large results or many concurrent jobs, the REST API at `/job/abc..` might return status `FINISHED` but does not contains any result. This might happen in two cases:
4141

42-
1. the job finished right now and results are in transfer.
43-
2. the job finished some time ago and results are remove from results cache already. See `spark.jobserver.job-result-cache-size` to increase the cache.
42+
1. The job finished right now and results are in transfer.
43+
2. The job finished some time ago and results are remove from results cache already. See `spark.jobserver.job-result-cache-size` to increase the cache.
44+
3. The spark jobserver instance restarted which clears the results cache.
4445

4546

4647
## AskTimeout when starting job server or contexts

doc/yarn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Now that we have a docker.conf that should work we can create our dockerfile to
8585

8686
dockerfile:
8787

88-
FROM velvia/spark-jobserver:0.6.1
88+
FROM sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2
8989
EXPOSE 32456-32472 # Expose driver port range (spark.driver.port + 16)
9090
ADD /path/to/your/docker.conf /app/docker.conf # Add the docker.conf to the container
9191
ADD /path/to/your/cluster-config /app/cluster-config # Add the yarn-site.xml and hfds-site.xml to the container
@@ -99,8 +99,8 @@ Your dockercontainer is now ready to be build:
9999
Output should look like this:
100100

101101
Sending build context to Docker daemon 21.5 kB
102-
Step 0 : FROM velvia/spark-jobserver:0.5.2
103-
---> a41dbd362a7d
102+
Step 0 : FROM sparkjobserver/spark-jobserver:0.7.0.mesos-0.25.0.spark-1.6.2
103+
---> 7a188f2d0dff
104104
Step 1 : EXPOSE 32456-32472
105105
---> f1c91bbaa2d8
106106
Step 2 : ADD ./docker.conf /app/docker.conf

job-server/config/docker.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ spark {
1616

1717
context-per-jvm = true
1818

19+
# Default client mode will start up a new JobManager int local machine
20+
# You can use mesos-cluster mode with REMOTE_JOBSERVER_DIR and MESOS_SPARK_DISPATCHER
21+
# environment value set in xxxx.sh file to launch JobManager in remote node
22+
# Mesos will take responsibility to offer resource to the JobManager process
23+
driver-mode = client
24+
1925
sqldao {
2026
# Directory where default H2 driver stores its data. Only needed for H2.
2127
rootdir = /database

0 commit comments

Comments
 (0)