Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyakshsharma committed Sep 28, 2023
1 parent 762bd06 commit 4b29b80
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions site/docs/develop/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ 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;

NessieApiV2 api = NessieClientBuilder.builder()
.withUri(URI.create("http://localhost:19121/api/v2"))
NessieApiV2 api = NessieClientBuilder.createClientBuilder(null, null)
.withUri(URI.create("http://localhost:19120/api/v2"))
.build(NessieApiV2.class);

List<Reference> references = api.getAllReferences().get();
List<Reference> references = api.getAllReferences().get().getReferences();
references.stream()
.map(Reference::getName)
.forEach(System.out::println);
Expand Down Expand Up @@ -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("table.name.space", "name");
ContentKey key2 = ContentKey.of("other.name.space", "name2");
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)
Expand All @@ -147,17 +147,17 @@ api.commitMultipleOperations()

Fetches the content for a single `ContentKey`
```java
ContentKey key = ContentKey.of("table.name.space", "name");
ContentKey key = ContentKey.of("your-namespace", "your-table-name");
Map<ContentKey, Content> map = api.getContent().key(key).refName("dev").get();
```

Fetches the content for multiple `ContentKey` instances
```java
List<ContentKey> keys =
Arrays.asList(
ContentKey.of("table.name.space", "name1"),
ContentKey.of("table.name.space", "name2"),
ContentKey.of("table.name.space", "name3"));
ContentKey.of("your-namespace1", "your-table-name1"),
ContentKey.of("your-namespace2", "your-table-name2"),
ContentKey.of("your-namespace3", "your-table-name3"));
Map<ContentKey, Content> allContent = api.getContent().keys(keys).refName("dev").get();
```

Expand Down Expand Up @@ -212,7 +212,7 @@ Note that `BASIC` is not supported in production and should only be used for dev
```java
NessieApiV1 api =
HttpClientBuilder.builder()
.withUri(URI.create("http://localhost:19121/api/v1"))
.withUri(URI.create("http://localhost:19120/api/v1"))
.withAuthentication(BasicAuthenticationProvider.create("my_username", "very_secret"))
.build(NessieApiV1.class);
```
Expand All @@ -221,7 +221,7 @@ The `BearerAuthenticationProvider` allows connecting to a Nessie server that has
```java
NessieApiV1 api =
HttpClientBuilder.builder()
.withUri(URI.create("http://localhost:19121/api/v1"))
.withUri(URI.create("http://localhost:19120/api/v1"))
.withAuthentication(BearerAuthenticationProvider.create("bearerToken"))
.build(NessieApiV1.class);
```
2 changes: 1 addition & 1 deletion site/docs/features/management.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Cut-off policies are parsed using the following logic and precedence:

### Running the _sweep_ (or _expire_) phase: Identifying live content references

Nessie GC's sweep phase uses the the actual table format, for example Iceberg, to map the collected
Nessie GC's sweep phase uses the actual table format, for example Iceberg, to map the collected
live content references to live file references. The _sweep_ phase operates on each content-ID. So
it collects the live file references for each content ID. Those file references refer to Iceberg
assets:
Expand Down
2 changes: 1 addition & 1 deletion site/docs/tools/iceberg/hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Whereby the above properties are explained as below:

To read and write into tables that are managed by Iceberg and Nessie, typical Hive SQL queries can be used. Refer to this documentation [here](https://iceberg.apache.org/hive/#querying-with-sql) for more information.

**Note**: Hive doesn't support the notation of `table@branch`, therefore everytime you want to execute against a specific branch, you will need to set this property to point to the working branch, e.g: `SET iceberg.catalog.<catalog_name>.ref=main`. E.g:
**Note**: Hive doesn't support the notation of `<table>@<branch>`, therefore everytime you want to execute against a specific branch, you will need to set this property to point to the working branch, e.g: `SET iceberg.catalog.<catalog_name>.ref=main`. E.g:
```
SET iceberg.catalog.<catalog_name>.ref=dev
Expand Down
2 changes: 1 addition & 1 deletion site/docs/tools/iceberg/spark.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ spark.sql("SELECT * FROM nessie.testing.`region@dev`")
spark.sql("SELECT * FROM nessie.testing.`region@<hash>`")
```

Notice in the SQL statements the `table@branch` must be escaped separately from namespace or catalog arguments.
Notice in the SQL statements the `<table>@<branch>` must be escaped separately from namespace or catalog arguments.

Future versions may add the ability to specify a timestamp to query the data at a specific point in time
(time-travel). In the meantime the history can be viewed on the command line or via the python client and a specific
Expand Down

0 comments on commit 4b29b80

Please sign in to comment.