| commit | 0d7085d7211e60a7c894218253500f3d07823105 | [log] [tgz] |
|---|---|---|
| author | Russell Spitzer <russell.spitzer@GMAIL.COM> | Wed Feb 17 11:05:38 2016 -0800 |
| committer | Russell Spitzer <russell.spitzer@GMAIL.COM> | Wed Feb 17 11:05:38 2016 -0800 |
| tree | 669a10ff9759b9be99e9e80715cd99bbc23c54c8 | |
| parent | b5b4c53d253ff5b8a07b42b6ec424af438931a7d [diff] | |
| parent | 6cf22ebb7e0c9a35b29d6e4d7c1691c28f8be48b [diff] |
Merge pull request #932 from datastax/SPARK-123-BACKPORT-to-B1.1 SPARKC-123 Bakcport to b1.1
This library lets you expose Cassandra tables as Spark RDDs, write Spark RDDs to Cassandra tables, and execute arbitrary CQL queries in your Spark applications.
saveToCassandra callWHERE clauseThis project has been published to the Maven Central Repository. For SBT to download the connector binaries, sources and javadoc, put this in your project SBT config:
libraryDependencies += "com.datastax.spark" %% "spark-cassandra-connector" % "1.1.2"
If you want to access the functionality of Connector from Java, you may want to add also a Java API module:
libraryDependencies += "com.datastax.spark" %% "spark-cassandra-connector-java" % "1.1.2"
In the root directory run
sbt assembly
A fat jar will be generated to both of these directories:
spark-cassandra-connector/target/scala-2.10/spark-cassandra-connector-java/target/scala-2.10/Select the former for Scala apps, the later for Java.
In the root directory run:
sbt package sbt doc
The library package jars will be placed in:
spark-cassandra-connector/target/scala-2.10/spark-cassandra-connector-java/target/scala-2.10/The documentation will be generated to:
spark-cassandra-connector/target/scala-2.10/api/spark-cassandra-connector-java/target/scala-2.10/api/New issues should be reported using JIRA. Please do not use the built-in GitHub issue tracker. It is left for archival purposes and it will be disabled soon.
Questions etc can be submitted to the user mailing list.
To develop this project, we recommend using IntelliJ IDEA. Make sure you have installed and enabled the Scala Plugin. Open the project with IntelliJ IDEA and it will automatically create the project structure from the provided SBT configuration.
Before contributing your changes to the project, please make sure that all unit tests and integration tests pass. Don't forget to add an appropriate entry at the top of CHANGES.txt. Finally open a pull-request on GitHub and await review.
If your pull-request is going to resolve some opened issue, please add Fixes #xx at the end of each commit message (where xx is the number of the issue).
To run unit and integration tests:
./sbt/sbt test ./sbt/sbt it:test
By default, integration tests start up a separate, single Cassandra instance and run Spark in local mode. It is possible to run integration tests with your own Cassandra and/or Spark cluster. First, prepare a jar with testing code:
./sbt/sbt test:package
Then copy the generated test jar to your Spark nodes and run:
export IT_TEST_CASSANDRA_HOST=<IP of one of the Cassandra nodes> export IT_TEST_SPARK_MASTER=<Spark Master URL> ./sbt/sbt it:test
Copyright 2014-2015, DataStax, Inc.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.