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, java.lang.String contentId, org.projectnessie.model.ContentKey key)
void
commitView(ViewMetadata base, ViewMetadata metadata, java.lang.String newMetadataLocation, java.lang.String contentId, 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)
boolean
dropView(TableIdentifier identifier, boolean purge)
org.projectnessie.model.IcebergContent
fetchContent(TableIdentifier tableIdentifier)
org.projectnessie.client.api.NessieApiV1
getApi()
org.projectnessie.model.Reference
getReference()
java.util.List<Namespace>
listNamespaces(Namespace namespace)
java.util.List<TableIdentifier>
listTables(Namespace namespace)
java.util.List<TableIdentifier>
listViews(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)
void
renameView(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)
org.projectnessie.model.IcebergView
view(TableIdentifier tableIdentifier)
NessieIcebergClient
withReference(java.lang.String requestedRef, java.lang.String hash)
-
-
-
Method Detail
-
getApi
public org.projectnessie.client.api.NessieApiV1 getApi()
-
getReference
public org.projectnessie.model.Reference getReference()
-
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)
-
listViews
public java.util.List<TableIdentifier> listViews(Namespace namespace)
-
table
public org.projectnessie.model.IcebergTable table(TableIdentifier tableIdentifier)
-
view
public org.projectnessie.model.IcebergView view(TableIdentifier tableIdentifier)
-
fetchContent
public org.projectnessie.model.IcebergContent fetchContent(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)
-
renameView
public void renameView(TableIdentifier from, TableIdentifier to)
-
dropTable
public boolean dropTable(TableIdentifier identifier, boolean purge)
-
dropView
public boolean dropView(TableIdentifier identifier, boolean purge)
-
commitTable
public void commitTable(TableMetadata base, TableMetadata metadata, java.lang.String newMetadataLocation, java.lang.String contentId, org.projectnessie.model.ContentKey key) throws org.projectnessie.error.NessieConflictException, org.projectnessie.error.NessieNotFoundException
- Throws:
org.projectnessie.error.NessieConflictException
org.projectnessie.error.NessieNotFoundException
-
commitView
public void commitView(ViewMetadata base, ViewMetadata metadata, java.lang.String newMetadataLocation, java.lang.String contentId, 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
-
-