Interface KeyValuePartitionLayout.LocationTableBuilder

All Known Implementing Classes:
LocationTableBuilderCsv, LocationTableBuilderDefinition
Enclosing class:
KeyValuePartitionLayout<TLK extends TableLocationKey,TARGET_FILE_TYPE>

public static interface KeyValuePartitionLayout.LocationTableBuilder
Interface for implementations to perform type coercion and specify a table of partition values for observed table locations.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    acceptLocation(@NotNull Collection<String> partitionValueStrings)
    Accept an ordered collection of strings representing partition values for a particular table location, parallel to a previously registered collection of partition keys.
    Build a Table with one column per partition key specified in registerPartitionKeys, and one row per location provided via acceptLocation, with cell values parallel to that location's partition values after any appropriate conversion has been applied.
    void
    registerPartitionKeys(@NotNull Collection<String> partitionKeys)
    Register an ordered collection of strings representing partition keys.
  • Method Details

    • registerPartitionKeys

      void registerPartitionKeys(@NotNull @NotNull Collection<String> partitionKeys)
      Register an ordered collection of strings representing partition keys. This should be called exactly once, and before any calls to acceptLocation.
      Parameters:
      partitionKeys - The partition keys to register
    • acceptLocation

      void acceptLocation(@NotNull @NotNull Collection<String> partitionValueStrings)
      Accept an ordered collection of strings representing partition values for a particular table location, parallel to a previously registered collection of partition keys. Should be called after a single call to registerPartitionKeys.
      Parameters:
      partitionValueStrings - The partition values to accept. Must have the same length as the previously registered partition keys.
    • build

      Table build()
      Build a Table with one column per partition key specified in registerPartitionKeys, and one row per location provided via acceptLocation, with cell values parallel to that location's partition values after any appropriate conversion has been applied. The implementation is responsible for determining the appropriate column types.
      Returns:
      The Table