forked from datastax/spark-cassandra-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SPARKC-22 Upgrade to Scala 2.11 and Add cross build.
- Loading branch information
Helena Edelson
committed
Mar 5, 2015
1 parent
8b460c5
commit d2386da
Showing
32 changed files
with
651 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Documentation | ||
|
||
## Building | ||
|
||
### Scala Versions | ||
You can choose to build, assemble and run both Spark and the Spark Cassandra Connector against Scala 2.10 or 2.11. | ||
|
||
#### Scala 2.11 | ||
Running SBT with the following builds against Scala 2.11 and the generated artifact paths coincide with | ||
the `binary.version` thereof: | ||
|
||
sbt -Dscala-2.11=true | ||
|
||
For Spark see: [Building Spark for Scala 2.11](http://spark.apache.org/docs/1.2.0/building-spark.html) | ||
|
||
For Scala 2.11 tasks: | ||
|
||
sbt -Dscala-2.11=true doc | ||
sbt -Dscala-2.11=true package | ||
sbt -Dscala-2.11=true assembly | ||
|
||
#### Scala 2.10 | ||
To use Scala 2.10 nothing extra is required. | ||
|
||
#### Version Cross Build | ||
This produces artifacts for both versions: | ||
Start SBT: | ||
|
||
sbt -Dscala-2.11=true | ||
|
||
Run in the SBT shell: | ||
|
||
+ package | ||
|
||
|
||
### Building The Assembly Jar | ||
In the root directory run | ||
|
||
sbt assembly | ||
|
||
To build the assembly jar against Scala 2.11: | ||
|
||
sbt -Dscala-2.11=true assembly | ||
|
||
A fat jar will be generated to both of these directories: | ||
- `spark-cassandra-connector/target/scala-{binary.version}/` | ||
- `spark-cassandra-connector-java/target/scala-{binary.version}/` | ||
|
||
Select the former for Scala apps, the later for Java. | ||
|
||
### Building General Artifacts | ||
All artifacts are generated to the standard output directories based on the Scala binary version you use. | ||
|
||
In the root directory run: | ||
|
||
sbt package | ||
sbt doc | ||
|
||
The library package jars will be generated to: | ||
- `spark-cassandra-connector/target/scala-{binary.version}/` | ||
- `spark-cassandra-connector-java/target/scala-{binary.version}/` | ||
|
||
The documentation will be generated to: | ||
- `spark-cassandra-connector/target/scala-{binary.version}/api/` | ||
- `spark-cassandra-connector-java/target/scala-{binary.version}/api/` | ||
|
||
##### Build Tasks | ||
The easiest way to do this is to make the assembled connector jar using | ||
|
||
sbt assembly | ||
|
||
Remember that if you need to build the assembly jar against Scala 2.11: | ||
|
||
sbt -Dscala-2.11=true assembly | ||
|
||
This will generate a jar file with all of the required dependencies in | ||
|
||
spark-cassandra-connector/spark-cassandra-connector/target/scala-{binary.version}/spark-cassandra-connector-assembly-*.jar | ||
|
||
Then add this jar to your Spark executor classpath by adding the following line to your spark-default.conf | ||
|
||
spark.executor.extraClassPath spark-cassandra-connector/spark-cassandra-connector/target/scala-{binary.version}/spark-cassandra-connector-assembly-$CurrentVersion-SNAPSHOT.jar | ||
|
||
This driver is also compatible with Spark distribution provided in | ||
[DataStax Enterprise 4.5](http://www.datastax.com/documentation/datastax_enterprise/4.5/datastax_enterprise/newFeatures.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.