kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From granthe...@apache.org
Subject kudu git commit: Change yetus dependency to compile in spark modules
Date Fri, 13 Jul 2018 15:12:15 GMT
Repository: kudu
Updated Branches:
  refs/heads/master d074de85d -> daee55509


Change yetus dependency to compile in spark modules

Due to Spark’s usage of reflection the Yetus annotation
is required at runtime.

Because it is getting in the way of other development
and Yetus is a small dependency, I changed the scope
to compile in the Spark modules to ensure the class
is available.

See KUDU-2500 for details and to track the
final solution.

Change-Id: I16867a75b7f29f57c557449f94e52439cb9642c9
Reviewed-on: http://gerrit.cloudera.org:8080/10927
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <mpercy@apache.org>
Reviewed-by: Tony Foerster <anthonymfoerster@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/daee5550
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/daee5550
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/daee5550

Branch: refs/heads/master
Commit: daee5550953d2596ed3f970f7027dffc695b6abe
Parents: d074de8
Author: Grant Henke <granthenke@apache.org>
Authored: Thu Jul 12 10:44:46 2018 -0500
Committer: Grant Henke <granthenke@apache.org>
Committed: Fri Jul 13 14:54:20 2018 +0000

----------------------------------------------------------------------
 java/kudu-backup/build.gradle      |  4 ++--
 java/kudu-backup/pom.xml           | 14 ++++++--------
 java/kudu-spark-tools/build.gradle |  4 ++--
 java/kudu-spark-tools/pom.xml      | 13 ++++++-------
 java/kudu-spark/build.gradle       |  3 ++-
 java/kudu-spark/pom.xml            | 13 ++++++-------
 6 files changed, 24 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/daee5550/java/kudu-backup/build.gradle
----------------------------------------------------------------------
diff --git a/java/kudu-backup/build.gradle b/java/kudu-backup/build.gradle
index 55e664c..5c009fe 100644
--- a/java/kudu-backup/build.gradle
+++ b/java/kudu-backup/build.gradle
@@ -31,6 +31,8 @@ dependencies {
     // Make sure wrong Scala version is not pulled in.
     exclude group: "org.scala-lang", module: "scala-library"
   }
+  // TODO(KUDU-2500): Spark uses reflection which requires the annotations at runtime.
+  compile libs.yetusAnnotations
 
   provided libs.scalaLibrary
   provided libs.sparkAvro
@@ -38,8 +40,6 @@ dependencies {
   provided libs.sparkSql
   provided libs.slf4jApi
 
-  optional libs.yetusAnnotations
-
   testCompile project(path: ":kudu-client", configuration: "shadowTest")
   testCompile project(path: ":kudu-spark", configuration: "test")
   testCompile libs.junit

http://git-wip-us.apache.org/repos/asf/kudu/blob/daee5550/java/kudu-backup/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-backup/pom.xml b/java/kudu-backup/pom.xml
index 11b6ab0..7f0e1a5 100644
--- a/java/kudu-backup/pom.xml
+++ b/java/kudu-backup/pom.xml
@@ -70,6 +70,12 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <!-- TODO(KUDU-2500): Spark uses reflection which requires the annotations at
runtime. -->
+        <dependency>
+            <groupId>org.apache.yetus</groupId>
+            <artifactId>audience-annotations</artifactId>
+            <version>${yetus.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>com.databricks</groupId>
@@ -103,14 +109,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.yetus</groupId>
-            <artifactId>audience-annotations</artifactId>
-            <version>${yetus.version}</version>
-            <optional>true</optional>
-        </dependency>
-
-
-        <dependency>
             <groupId>org.apache.kudu</groupId>
             <artifactId>kudu-${spark.version.label}_${scala.binary.version}</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/kudu/blob/daee5550/java/kudu-spark-tools/build.gradle
----------------------------------------------------------------------
diff --git a/java/kudu-spark-tools/build.gradle b/java/kudu-spark-tools/build.gradle
index 0f2cdd7..eb93f20 100644
--- a/java/kudu-spark-tools/build.gradle
+++ b/java/kudu-spark-tools/build.gradle
@@ -22,6 +22,8 @@ dependencies {
   compile project(path: ":kudu-client", configuration: "shadow")
   compile project(path: ":kudu-client-tools", configuration: "shadow")
   compile project(path: ":kudu-spark", configuration: "shadow")
+  // TODO(KUDU-2500): Spark uses reflection which requires the annotations at runtime.
+  compile libs.yetusAnnotations
 
   provided libs.scalaLibrary
   provided libs.sparkAvro
@@ -29,8 +31,6 @@ dependencies {
   provided libs.sparkSql
   provided libs.slf4jApi
 
-  optional libs.yetusAnnotations
-
   testCompile project(path: ":kudu-client", configuration: "shadowTest")
   testCompile project(path: ":kudu-spark", configuration: "test")
   testCompile libs.junit

http://git-wip-us.apache.org/repos/asf/kudu/blob/daee5550/java/kudu-spark-tools/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-spark-tools/pom.xml b/java/kudu-spark-tools/pom.xml
index fbfc2b5..0fd7744 100644
--- a/java/kudu-spark-tools/pom.xml
+++ b/java/kudu-spark-tools/pom.xml
@@ -47,6 +47,12 @@
             <artifactId>kudu-${spark.version.label}_${scala.binary.version}</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <!-- TODO(KUDU-2500): Spark uses reflection which requires the annotations at
runtime. -->
+        <dependency>
+            <groupId>org.apache.yetus</groupId>
+            <artifactId>audience-annotations</artifactId>
+            <version>${yetus.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>com.databricks</groupId>
@@ -92,13 +98,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.yetus</groupId>
-            <artifactId>audience-annotations</artifactId>
-            <version>${yetus.version}</version>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.kudu</groupId>
             <artifactId>kudu-client</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/kudu/blob/daee5550/java/kudu-spark/build.gradle
----------------------------------------------------------------------
diff --git a/java/kudu-spark/build.gradle b/java/kudu-spark/build.gradle
index 8ee217a..c723902 100644
--- a/java/kudu-spark/build.gradle
+++ b/java/kudu-spark/build.gradle
@@ -20,13 +20,14 @@ apply from: "$rootDir/gradle/shadow.gradle"
 
 dependencies {
   compile project(path: ":kudu-client", configuration: "shadow")
+  // TODO(KUDU-2500): Spark uses reflection which requires the annotations at runtime.
+  compile libs.yetusAnnotations
 
   provided libs.scalaLibrary
   provided libs.sparkCore
   provided libs.sparkSql
   provided libs.slf4jApi
 
-  optional libs.yetusAnnotations
 
   testCompile project(path: ":kudu-client", configuration: "shadowTest")
   testCompile libs.junit

http://git-wip-us.apache.org/repos/asf/kudu/blob/daee5550/java/kudu-spark/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-spark/pom.xml b/java/kudu-spark/pom.xml
index 09861f7..51b564e 100644
--- a/java/kudu-spark/pom.xml
+++ b/java/kudu-spark/pom.xml
@@ -29,6 +29,12 @@
             <artifactId>kudu-client</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <!-- TODO(KUDU-2500): Spark uses reflection which requires the annotations at
runtime. -->
+        <dependency>
+            <groupId>org.apache.yetus</groupId>
+            <artifactId>audience-annotations</artifactId>
+            <version>${yetus.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.spark</groupId>
@@ -68,13 +74,6 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.yetus</groupId>
-            <artifactId>audience-annotations</artifactId>
-            <version>${yetus.version}</version>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.kudu</groupId>
             <artifactId>kudu-client</artifactId>
             <version>${project.version}</version>


Mime
View raw message