Package org.apache.iceberg.nessie
Class NessieIcebergClient
- java.lang.Object
-
- org.apache.iceberg.nessie.NessieIcebergClient
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class NessieIcebergClient extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description NessieIcebergClient(org.projectnessie.client.api.NessieApiV1 api, java.lang.String requestedRef, java.lang.String requestedHash, java.util.Map<java.lang.String,java.lang.String> catalogOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
commitTable(TableMetadata base, TableMetadata metadata, java.lang.String newMetadataLocation, org.projectnessie.model.IcebergTable expectedContent, org.projectnessie.model.ContentKey key)
void
createNamespace(Namespace namespace, java.util.Map<java.lang.String,java.lang.String> metadata)
boolean
dropNamespace(Namespace namespace)
boolean
dropTable(TableIdentifier identifier, boolean purge)
org.projectnessie.client.api.NessieApiV1
getApi()
org.apache.iceberg.nessie.UpdateableReference
getRef()
java.util.List<Namespace>
listNamespaces(Namespace namespace)
java.util.List<TableIdentifier>
listTables(Namespace namespace)
java.util.Map<java.lang.String,java.lang.String>
loadNamespaceMetadata(Namespace namespace)
java.lang.String
refName()
void
refresh()
boolean
removeProperties(Namespace namespace, java.util.Set<java.lang.String> properties)
void
renameTable(TableIdentifier from, TableIdentifier to)
boolean
setProperties(Namespace namespace, java.util.Map<java.lang.String,java.lang.String> properties)
org.projectnessie.model.IcebergTable
table(TableIdentifier tableIdentifier)
NessieIcebergClient
withReference(java.lang.String requestedRef, java.lang.String hash)
-
-
-
Method Detail
-
getApi
public org.projectnessie.client.api.NessieApiV1 getApi()
-
getRef
public org.apache.iceberg.nessie.UpdateableReference getRef()
-
refresh
public void refresh() throws org.projectnessie.error.NessieNotFoundException
- Throws:
org.projectnessie.error.NessieNotFoundException
-
withReference
public NessieIcebergClient withReference(java.lang.String requestedRef, java.lang.String hash)
-
listTables
public java.util.List<TableIdentifier> listTables(Namespace namespace)
-
table
public org.projectnessie.model.IcebergTable table(TableIdentifier tableIdentifier)
-
createNamespace
public void createNamespace(Namespace namespace, java.util.Map<java.lang.String,java.lang.String> metadata)
-
listNamespaces
public java.util.List<Namespace> listNamespaces(Namespace namespace) throws NoSuchNamespaceException
- Throws:
NoSuchNamespaceException
-
dropNamespace
public boolean dropNamespace(Namespace namespace) throws NamespaceNotEmptyException
- Throws:
NamespaceNotEmptyException
-
loadNamespaceMetadata
public java.util.Map<java.lang.String,java.lang.String> loadNamespaceMetadata(Namespace namespace) throws NoSuchNamespaceException
- Throws:
NoSuchNamespaceException
-
setProperties
public boolean setProperties(Namespace namespace, java.util.Map<java.lang.String,java.lang.String> properties)
-
removeProperties
public boolean removeProperties(Namespace namespace, java.util.Set<java.lang.String> properties)
-
renameTable
public void renameTable(TableIdentifier from, TableIdentifier to)
-
dropTable
public boolean dropTable(TableIdentifier identifier, boolean purge)
-
commitTable
public void commitTable(TableMetadata base, TableMetadata metadata, java.lang.String newMetadataLocation, org.projectnessie.model.IcebergTable expectedContent, org.projectnessie.model.ContentKey key) throws org.projectnessie.error.NessieConflictException, org.projectnessie.error.NessieNotFoundException
- Throws:
org.projectnessie.error.NessieConflictException
org.projectnessie.error.NessieNotFoundException
-
refName
public java.lang.String refName()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-