Skip to content

Contributing Building

Michael Nitschinger edited this page Mar 4, 2015 · 3 revisions

If you want to contribute and/or build the connector, you can find more information about that here.

Building The Connector

The connector uses sbt, so the easiest way to grab the latest version is to check it out from source and then publish it to your local maven repository:

$ sbt publish-m2
...
[info] Done packaging.
[info] 	published couchbase-spark-connector_2.10 to ~/.m2/repository/com/couchbase/client/couchbase-spark-connector_2.10/1.0.0-SNAPSHOT/couchbase-spark-connector_2.10-1.0.0-SNAPSHOT.pom
[info] 	published couchbase-spark-connector_2.10 to ~/.m2/repository/com/couchbase/client/couchbase-spark-connector_2.10/1.0.0-SNAPSHOT/couchbase-spark-connector_2.10-1.0.0-SNAPSHOT.jar
[info] 	published couchbase-spark-connector_2.10 to ~/.m2/repository/com/couchbase/client/couchbase-spark-connector_2.10/1.0.0-SNAPSHOT/couchbase-spark-connector_2.10-1.0.0-SNAPSHOT-sources.jar
[info] 	published couchbase-spark-connector_2.10 to ~/.m2/repository/com/couchbase/client/couchbase-spark-connector_2.10/1.0.0-SNAPSHOT/couchbase-spark-connector_2.10-1.0.0-SNAPSHOT-javadoc.jar

If you want to cross compile for 2.10 and 2.11 use sbt +publish-m2

Building A Fat JAR

You can also build an assembly that contains all dependencies. That way you can put it on every node in the spark cluster and don't worry about missing dependencies on the classpath.

Just run sbt assembly and it will put it in the target folder like /couchbase-spark-connector/target/scala-2.10/spark-connector-assembly-1.0.0-SNAPSHOT.jar. This one has several megabytes since it includes all dependencies (but not spark itself).

Contributing

For now please just submit a pull request to the repository here. There is a good chance that we'll move it to gerrit once it hit a GA release.

Also, you can find more information here on contributing and CLA.

Clone this wiki locally