Class MockTableMetadata

java.lang.Object
org.projectnessie.gc.iceberg.mocks.MockTableMetadata

@Immutable public abstract class MockTableMetadata extends Object
Generates mocked Iceberg table metadata objects based on a bunch of parameters.

Parameters define the number of snapshots and the number of ManifestContent.DATA and ManifestContent.DELETES manifests for each snapshot, using Snapshot.manifestListLocation().

Also generates the appropriate org.apache.iceberg.ManifestEntry<F extends org.apache.iceberg.ContentFile<F>>s for Snapshot.addedDataFiles(FileIO) and Snapshot.removedDeleteFiles(FileIO).

  • Field Details

  • Constructor Details

    • MockTableMetadata

      public MockTableMetadata()
  • Method Details

    • empty

      public static MockTableMetadata empty()
    • jsonNode

      @Lazy public com.fasterxml.jackson.databind.JsonNode jsonNode()
    • snapshots

      public abstract List<MockSnapshot> snapshots()
    • schemas

      @Default public List<MockSchema> schemas()
    • sortOrders

      @Default public List<MockSortOrder> sortOrders()
    • partitionSpecs

      @Default public List<MockPartitionSpec> partitionSpecs()
    • currentSnapshotId

      @Default public long currentSnapshotId()
    • defaultSortOrderId

      @Default public int defaultSortOrderId()
    • lastPartitionId

      @Default public int lastPartitionId()
    • defaultSpecId

      @Default public int defaultSpecId()
    • currentSchemaId

      @Default public int currentSchemaId()
    • lastColumnId

      @Default public int lastColumnId()
    • lastUpdatedMs

      @Default public long lastUpdatedMs()
    • lastSequenceNumber

      @Default public int lastSequenceNumber()
    • location

      public abstract String location()
    • tableUuid

      @Default public String tableUuid()
    • partitionSpec

      public MockPartitionSpec partitionSpec(int partitionSpecId)
    • schema

      public MockSchema schema(int schemaId)