Is there a Java example for the proper way to get the GlueCatalog object? We 
are trying to convert from HadoopTables and need access to the lower-level APIs 
to create and update tables with partitions.

I’m looking for something similar to these examples for HadoopTables and 
HiveCatalog: https://iceberg.apache.org/java-api-quickstart/

From what I can gather looking at the code, this is what I came up with (our 
catalog name is `iceberg`), but it feels like there’s probably a better way 
that I’m not seeing:

      this.icebergCatalog = new GlueCatalog();
      Configuration conf = spark.sparkContext().hadoopConfiguration();
      Map<String, String> props = ImmutableMap.of(
        "type", conf.get("spark.sql.catalog.iceberg.type"),
        "warehouse", conf.get("spark.sql.catalog.iceberg.warehouse"),
        "lock-impl", conf.get("spark.sql.catalog.iceberg.lock-impl"),
        "lock.table", conf.get("spark.sql.catalog.iceberg.lock.table"),
        "io-impl", conf.get("spark.sql.catalog.iceberg.io-impl")
      );
      this.icebergCatalog.initialize("iceberg", props);

Sorry for the potentially n00b question, but I’m a n00b 😃

Greg

Reply via email to