publish a separate uberjar with the spark job and guava relocated (#5)
diff --git a/README.md b/README.md index c79e17d..5fab877 100644 --- a/README.md +++ b/README.md
@@ -43,7 +43,7 @@ $ docker run --name cas-tgt -d -p 9043:9042 cassandra:latest $ docker exec cas-src cassandra-stress write n=1k $ docker exec cas-tgt cassandra-stress write n=1k -$ spark-submit --verbose --files ./spark-job/localconfig.yaml --class org.apache.cassandra.diff.DiffJob spark-job/target/spark-job-0.1-SNAPSHOT.jar localconfig.yaml +$ spark-submit --verbose --files ./spark-job/localconfig.yaml --class org.apache.cassandra.diff.DiffJob spark-uberjar/target/spark-uberjar-0.2-SNAPSHOT.jar localconfig.yaml # ... logs INFO DiffJob:124 - FINISHED: {standard1=Matched Partitions - 1000, Mismatched Partitions - 0, Partition Errors - 0, Partitions Only In Source - 0, Partitions Only In Target - 0, Skipped Partitions - 0, Matched Rows - 1000, Matched Values - 6000, Mismatched Values - 0 } ## start api-server: @@ -138,4 +138,4 @@ 6. Stage the release for a vote ```shell script $ mvn release:perform - ``` \ No newline at end of file + ```
diff --git a/api-server/pom.xml b/api-server/pom.xml index ab431da..4c67ed1 100644 --- a/api-server/pom.xml +++ b/api-server/pom.xml
@@ -25,7 +25,7 @@ <parent> <groupId>org.apache.cassandra.diff</groupId> <artifactId>diff</artifactId> - <version>0.1-SNAPSHOT</version> + <version>0.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion>
diff --git a/common/pom.xml b/common/pom.xml index f73c4f5..a25cd10 100644 --- a/common/pom.xml +++ b/common/pom.xml
@@ -25,7 +25,7 @@ <parent> <groupId>org.apache.cassandra.diff</groupId> <artifactId>diff</artifactId> - <version>0.1-SNAPSHOT</version> + <version>0.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -51,4 +51,4 @@ </dependencies> -</project> \ No newline at end of file +</project>
diff --git a/pom.xml b/pom.xml index 16b35b7..82bbf69 100644 --- a/pom.xml +++ b/pom.xml
@@ -31,11 +31,12 @@ <groupId>org.apache.cassandra.diff</groupId> <artifactId>diff</artifactId> <packaging>pom</packaging> - <version>0.1-SNAPSHOT</version> + <version>0.2-SNAPSHOT</version> <modules> <module>common</module> <module>spark-job</module> <module>api-server</module> + <module>spark-uberjar</module> </modules> <scm>
diff --git a/spark-job/pom.xml b/spark-job/pom.xml index 4d4c8fc..c7df5bd 100644 --- a/spark-job/pom.xml +++ b/spark-job/pom.xml
@@ -25,7 +25,7 @@ <parent> <groupId>org.apache.cassandra.diff</groupId> <artifactId>diff</artifactId> - <version>0.1-SNAPSHOT</version> + <version>0.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -68,34 +68,4 @@ </dependency> </dependencies> - - <build> - <plugins> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>3.2.1</version> - <executions> - <!-- Run shade goal on package phase --> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - </execution> - </executions> - <configuration> - <relocations> - <relocation> - <pattern>com.google</pattern> - <shadedPattern>relocated.com.google</shadedPattern> - </relocation> - </relocations> - </configuration> - </plugin> - - </plugins> - </build> - </project>
diff --git a/spark-uberjar/pom.xml b/spark-uberjar/pom.xml new file mode 100644 index 0000000..6bb31d7 --- /dev/null +++ b/spark-uberjar/pom.xml
@@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.apache.cassandra.diff</groupId> + <artifactId>diff</artifactId> + <version>0.2-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>spark-uberjar</artifactId> + <packaging>jar</packaging> + + <dependencies> + + <!-- compile dependencies --> + <dependency> + <groupId>org.apache.cassandra.diff</groupId> + <artifactId>common</artifactId> + <version>${project.parent.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.cassandra.diff</groupId> + <artifactId>spark-job</artifactId> + <version>${project.parent.version}</version> + </dependency> + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.2.1</version> + <executions> + <!-- Run shade goal on package phase --> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + <configuration> + <relocations> + <relocation> + <pattern>com.google</pattern> + <shadedPattern>relocated.com.google</shadedPattern> + </relocation> + </relocations> + </configuration> + </plugin> + + </plugins> + </build> + +</project>