ahmedabu98 commented on code in PR #32242:
URL: https://github.com/apache/beam/pull/32242#discussion_r1724868428


##########
sdks/java/io/expansion-service/build.gradle:
##########
@@ -44,9 +44,18 @@ dependencies {
   implementation project(":sdks:java:io:kafka:upgrade")
   permitUnusedDeclared project(":sdks:java:io:kafka:upgrade") // BEAM-11761
 
-  // Needed by Iceberg I/O users that use GCS for the warehouse location.
+  // **** IcebergIO runtime dependencies ****
+  runtimeOnly library.java.hadoop_client
+  // Needed when using GCS as the warehouse location.
   implementation library.java.bigdataoss_gcs_connector
   permitUnusedDeclared library.java.bigdataoss_gcs_connector
+  // Needed for HiveCatalog
+  runtimeOnly ("org.apache.iceberg:iceberg-hive-metastore:1.4.2")
+  runtimeOnly project(path: ":sdks:java:io:iceberg:hive:exec", configuration: 
"shadow")
+  // Needed for BigQuery Metastore catalog (this isn't supported for java 8)
+  if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_8) > 0) {
+    runtimeOnly project(path: ":sdks:java:io:iceberg:bigquerymetastore", 
configuration: "shadow")
+  }

Review Comment:
   This is the error if you import and use the class directly (or if it's 
loaded dynamically):
   ```
   Compiling with JDK Java compiler API.
   
/Users/ahmedabualsaud/github/apache/beam/sdks/java/io/iceberg/src/test/java/org/apache/beam/sdk/io/iceberg/BigQueryMetastoreCatalogIT.java:60:
 error: cannot access BigQueryMetastoreCatalog
   import org.apache.iceberg.gcp.bigquery.BigQueryMetastoreCatalog;
                                         ^
     bad class file: 
/Users/ahmedabualsaud/github/apache/beam/sdks/java/io/iceberg/bigquerymetastore/build/libs/beam-sdks-java-io-iceberg-bigquerymetastore-2.59.0-SNAPSHOT.jar(/org/apache/iceberg/gcp/bigquery/BigQueryMetastoreCatalog.class)
       class file has wrong version 55.0, should be 53.0
       Please remove or make sure it appears in the correct subdirectory of the 
classpath.
   ```
   
   It doesn't complain about anything otherwise though, so we can prob just 
remove this conditional



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to