You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/03/07 16:13:56 UTC

[GitHub] [iceberg] rymurr commented on a change in pull request #2292: Add nessie documentation

rymurr commented on a change in pull request #2292:
URL: https://github.com/apache/iceberg/pull/2292#discussion_r589052242



##########
File path: site/docs/nessie.md
##########
@@ -0,0 +1,120 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements.  See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+# Iceberg Nessie Integration
+
+Iceberg provides integration with Nessie through the `iceberg-nessie` module.
+This section describes how to use Iceberg with Nessie. Nessie provides several key features on top of iceberg:
+
+* multi-table transactions
+* git-like operations (eg branches, tags, commits)
+* hive-like metastore capabilities
+
+See [Project Nessie](https://projectnessie.org) for more information on Nessie. Nessie requires a server to run, see
+[Getting Started](https://projectnessie.org/try/) to start a Nessie server.
+
+## Enabling Nessie Catalog
+
+The `iceberg-nessie` module is bundled with Spark and Flink runtimes for all versions from `0.11.0`. To get started
+with nessie and iceberg simply add the iceberg runtime to your process. Eg: `spark-sql --packages
+org.apache.iceberg:iceberg-spark3-runtiume:0.11.0`. 
+
+## Nessie Catalog
+
+One major feature introduced in release `0.11.0` is the ability to easily interact with a [Custom
+Catalog](../custom-catalog) from Spark and Flink. See [Spark Configuration](../spark-configuration#catalog-configuration)
+  and [Flink Configuration](../flink#custom-catalog) for instructions for adding a custom catalog to Iceberg. 
+
+To use the Nessie Catalog the following properties are required:
+
+* `warehouse`. Like most other catalogs the warehouse property is a file path to where this catalog should store tables.
+* `uri`. This is the Nessie server base uri. Eg `http://localhost:19120/api/v1`.
+* `ref` (optional). This is the Nessie branch or tag you want to work in.
+
+To run directly in Java this looks like:
+
+``` java
+Map<String, String> options = new HashMap<>();
+options.put("warehouse", "/path/to/warehouse");
+options.put("ref", "main");
+options.put("uri", "https://localhost:19120/api/v1");
+Catalog nessieCatalog = CatalogUtil.loadCatalog("org.apache.iceberg.nessie.NessieCatalog", "nessie", hadoopConfig, options);
+```
+
+and in Spark:
+
+``` java
+conf.set("spark.sql.catalog.nessie.warehouse", "/path/to/warehouse");
+conf.set("spark.sql.catalog.nessie.uri", "http://localhost:19120/api/v1")
+conf.set("spark.sql.catalog.nessie.ref", "main")
+conf.set("spark.sql.catalog.nessie.catalog-impl", "org.apache.iceberg.nessie.NessieCatalog")
+conf.set("spark.sql.catalog.nessie", "org.apache.iceberg.spark.SparkCatalog")

Review comment:
       good idea, fixed.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org