Class IcebergTable


  • @Immutable
    public abstract class IcebergTable
    extends IcebergContent
    Represents the state of an Iceberg table in Nessie. An Iceberg table is globally identified via its unique ID.

    The Iceberg-table-state consists of the location to the table-metadata and the state of relevant IDs using a serialized version of those.

    When adding a new table (aka content-object identified by a content-id), use a Operation.Put without an expected-value. In all other cases (updating an existing table). always pass the last known version of IcebergTable as the expected-value within the put-operation.

    • Nested Class Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      IcebergTable()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static org.projectnessie.model.ImmutableIcebergTable.Builder builder()  
      abstract java.util.Map<java.lang.String,​java.lang.Object> getMetadata()
      Deprecated.
      abstract @NotNull @NotNull @NotBlank @NotBlank java.lang.String getMetadataLocation()
      Location where Iceberg stored its TableMetadata file.
      abstract int getSchemaId()
      Corresponds to Iceberg's currentSchemaId.
      abstract long getSnapshotId()
      Corresponds to Iceberg's currentSnapshotId.
      abstract int getSortOrderId()
      Corresponds to Iceberg's defaultSortOrderId.
      abstract int getSpecId()
      Corresponds to Iceberg's defaultSpecId.
      Content.Type getType()
      Returns the Content.Type value for this content object.
      static IcebergTable of​(java.lang.String metadataLocation, long snapshotId, int schemaId, int specId, int sortOrderId)  
      static IcebergTable of​(java.lang.String metadataLocation, long snapshotId, int schemaId, int specId, int sortOrderId, java.lang.String contentId)  
      abstract IcebergTable withId​(java.lang.String id)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IcebergTable

        public IcebergTable()
    • Method Detail

      • getMetadataLocation

        @NotNull
        @NotNull
        @NotBlank
        @NotBlank
        public abstract @NotNull @NotNull @NotBlank @NotBlank java.lang.String getMetadataLocation()
        Location where Iceberg stored its TableMetadata file. The location depends on the (implementation of) Iceberg's FileIO configured for the particular Iceberg table.
      • getSnapshotId

        public abstract long getSnapshotId()
        Corresponds to Iceberg's currentSnapshotId.
      • getSchemaId

        public abstract int getSchemaId()
        Corresponds to Iceberg's currentSchemaId.
      • getSpecId

        public abstract int getSpecId()
        Corresponds to Iceberg's defaultSpecId.
      • getSortOrderId

        public abstract int getSortOrderId()
        Corresponds to Iceberg's defaultSortOrderId.
      • getType

        public Content.Type getType()
        Description copied from class: Content
        Returns the Content.Type value for this content object.

        The name of the returned value should match the JSON type name used for serializing the content object.

        Specified by:
        getType in class Content
      • getMetadata

        @Deprecated
        @Nullable
        @Nullable
        public abstract java.util.Map<java.lang.String,​java.lang.Object> getMetadata()
        Deprecated.
      • builder

        public static org.projectnessie.model.ImmutableIcebergTable.Builder builder()
      • of

        public static IcebergTable of​(java.lang.String metadataLocation,
                                      long snapshotId,
                                      int schemaId,
                                      int specId,
                                      int sortOrderId)
      • of

        public static IcebergTable of​(java.lang.String metadataLocation,
                                      long snapshotId,
                                      int schemaId,
                                      int specId,
                                      int sortOrderId,
                                      java.lang.String contentId)