HelloHorizon opened a new issue #245: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V URL: https://github.com/apache/incubator-iceberg/issues/245 While creating Iceberg table using PartitionSpec.builderFor, I faced the java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V I use the Iceberg-master and Spark 2.4.0 . ``` import org.apache.hadoop.fs.Path import org.apache.iceberg.hadoop.HadoopTables import org.apache.iceberg.spark.SparkSchemaUtil import org.apache.iceberg.PartitionSpec val path = "hdfs://${TABLE_PATH}" val df = spark.read.parquet("/user/hive/warehouse/tpcds.db/web_sales") { val conf = spark.sparkContext.hadoopConfiguration val fs = new Path(path).getFileSystem(conf) fs.delete(new Path(path), true) val tables = new HadoopTables(conf) val icebergSchema = SparkSchemaUtil.convert(df.schema) val spec = PartitionSpec.builderFor(icebergSchema) .identity("ws_sold_date_sk") .identity("ws_sold_time_sk") .identity("ws_ship_date_sk") .identity("ws_item_sk") .identity("ws_bill_customer_sk") .identity("ws_bill_cdemo_sk") .identity("ws_bill_hdemo_sk") .identity("ws_bill_addr_sk") .identity("ws_ship_customer_sk") .identity("ws_ship_cdemo_sk") .identity("ws_ship_hdemo_sk") .identity("ws_ship_addr_sk") .identity("ws_web_page_sk") .identity("ws_web_site_sk") .identity("ws_ship_mode_sk") .identity("ws_warehouse_sk") .identity("ws_promo_sk") .identity("ws_order_number") .identity("ws_quantity") .identity("ws_wholesale_cost") .identity("ws_list_price") .identity("ws_sales_price") .identity("ws_ext_discount_amt") .identity("ws_ext_sales_price") .identity("ws_ext_wholesale_cost") .identity("ws_ext_list_price") .identity("ws_ext_tax") .identity("ws_coupon_amt") .identity("ws_ext_ship_cost") .identity("ws_net_paid") .identity("ws_net_paid_inc_tax") .identity("ws_net_paid_inc_ship") .identity("ws_net_paid_inc_ship_tax") .identity("ws_net_profit") .build() tables.create(icebergSchema, spec, path) tables.load(path).schema } ``` ``` java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V at org.apache.iceberg.PartitionSpec$Builder.checkAndAddPartitionName(PartitionSpec.java:330) at org.apache.iceberg.PartitionSpec$Builder.identity(PartitionSpec.java:356) ... 93 elided ``` I appreciate if anyone can help me with this problem.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
