samredai commented on a change in pull request #3253: URL: https://github.com/apache/iceberg/pull/3253#discussion_r725168996
########## 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); +``` + +Alternatively, you can configure the Hive Catalog using Spark's Hadoop configuration. Review comment: Ah I see! I missed that part but it makes total sense, I'll update this. -- 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]
