From ba81dddf033902d1339ed40cc182097b3aa868c3 Mon Sep 17 00:00:00 2001 From: pratyakshsharma Date: Thu, 28 Sep 2023 15:15:56 +0530 Subject: [PATCH] Address review comments --- site/docs/develop/java.md | 22 +++++++++++----------- site/docs/tools/iceberg/spark.md | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/site/docs/develop/java.md b/site/docs/develop/java.md index 44e86de2c31..a3a4974d449 100644 --- a/site/docs/develop/java.md +++ b/site/docs/develop/java.md @@ -25,20 +25,20 @@ tests) + Jackson's DataBinding and JAX-RS modules (any version from the last ~3+ ## API The `NessieClientBuilder` and concrete builder implementations (such as `HttpClientBuilder`) provide an easy way of configuring and building a `NessieApi`. The currently stable API that should be used -is `NessieApiV1`, which can be instantiated as shown below: +is `NessieApiV2`, which can be instantiated as shown below: ```java import java.net.URI; import java.util.List; -import org.projectnessie.client.api.NessieApiV1; +import org.projectnessie.client.api.NessieApiV2; import org.projectnessie.client.NessieClientBuilder; import org.projectnessie.model.Reference; -NessieApiV1 api = NessieClientBuilder.createClientBuilder(null, null) - .withUri(URI.create("http://localhost:19120/api/v1")) - .build(NessieApiV1.class); +NessieApiV2 api = NessieClientBuilder.createClientBuilder(null, null) + .withUri(URI.create("http://localhost:19120/api/v2")) + .build(NessieApiV2.class); List references = api.getAllReferences().get().getReferences(); references.stream() @@ -131,8 +131,8 @@ config.getVersion(); Creates a new commit by adding metadata for an `IcebergTable` under the specified `ContentKey` instance represented by `key` and deletes content represented by `key2` ```java -ContentKey key = ContentKey.of("", ""); -ContentKey key2 = ContentKey.of("", ""); +ContentKey key = ContentKey.of("your-namespace", "your-table-name"); +ContentKey key2 = ContentKey.of("your-namespace2", "your-table-name2"); IcebergTable icebergTable = IcebergTable.of("path1", 42L); api.commitMultipleOperations() .branchName(branch) @@ -147,7 +147,7 @@ api.commitMultipleOperations() Fetches the content for a single `ContentKey` ```java -ContentKey key = ContentKey.of("", ""); +ContentKey key = ContentKey.of("your-namespace", "your-table-name"); Map map = api.getContent().key(key).refName("dev").get(); ``` @@ -155,9 +155,9 @@ Fetches the content for multiple `ContentKey` instances ```java List keys = Arrays.asList( - ContentKey.of("", ""), - ContentKey.of("", ""), - ContentKey.of("", "")); + ContentKey.of("your-namespace1", "your-table-name1"), + ContentKey.of("your-namespace2", "your-table-name2"), + ContentKey.of("your-namespace3", "your-table-name3")); Map allContent = api.getContent().keys(keys).refName("dev").get(); ``` diff --git a/site/docs/tools/iceberg/spark.md b/site/docs/tools/iceberg/spark.md index 2a9a8671ab7..e0df9560665 100644 --- a/site/docs/tools/iceberg/spark.md +++ b/site/docs/tools/iceberg/spark.md @@ -300,8 +300,8 @@ Spark/Hadoop configs. ``` python linenums="1" # read from branch dev spark.read().format("iceberg").load("testing.region@dev") -# read specifically from hash in dev branch -spark.read().format("iceberg").load("testing.region@dev#") +# read specifically from hash +spark.read().format("iceberg").load("testing.region@") spark.sql("SELECT * FROM nessie.testing.`region@dev`") spark.sql("SELECT * FROM nessie.testing.`region@dev#`")