samredai commented on a change in pull request #3253: URL: https://github.com/apache/iceberg/pull/3253#discussion_r725168191
########## File path: site/docs/java-api-quickstart.md ########## @@ -23,12 +23,26 @@ Tables are created using either a [`Catalog`](./javadoc/master/index.html?org/ap ### Using a Hive catalog -The Hive catalog connects to a Hive MetaStore to keep track of Iceberg tables. This example uses Spark's Hadoop configuration to get a Hive catalog: +The Hive catalog connects to a Hive MetaStore to keep track of Iceberg tables. +You can initialize a Hive Catalog with a name and some properties. +(see: [Catalog properties](https://iceberg.apache.org/configuration/#catalog-properties)) ```java import org.apache.iceberg.hive.HiveCatalog; -Catalog catalog = new HiveCatalog(spark.sparkContext().hadoopConfiguration()); +Catalog catalog = new HiveCatalog(); + +Map <String, String> properties = new HashMap<String, String>(); +properties.put("warehouse", "..."); +properties.put("uri", "..."); + +catalog.initialize("hive", properties); Review comment: Yes it currently fails but I think it's isolated to just if `toString()` is called which is hard to get around when using a REPL. The failure actually happens earlier than `initialize()` and seems to happen right at construction. (I'm going to try and confirm that last part) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
