Interface TableOptimizerRun.Builder

    • Method Detail

      • startTimestamp

        TableOptimizerRun.Builder startTimestamp​(Instant startTimestamp)

        Represents the epoch timestamp at which the compaction job was started within Lake Formation.

        Parameters:
        startTimestamp - Represents the epoch timestamp at which the compaction job was started within Lake Formation.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • endTimestamp

        TableOptimizerRun.Builder endTimestamp​(Instant endTimestamp)

        Represents the epoch timestamp at which the compaction job ended.

        Parameters:
        endTimestamp - Represents the epoch timestamp at which the compaction job ended.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • metrics

        @Deprecated
        TableOptimizerRun.Builder metrics​(RunMetrics metrics)
        Deprecated.
        Metrics has been replaced by optimizer type specific metrics such as IcebergCompactionMetrics

        A RunMetrics object containing metrics for the optimizer run.

        This member is deprecated. See the individual metric members for compaction, retention, and orphan file deletion.

        Parameters:
        metrics - A RunMetrics object containing metrics for the optimizer run.

        This member is deprecated. See the individual metric members for compaction, retention, and orphan file deletion.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • error

        TableOptimizerRun.Builder error​(String error)

        An error that occured during the optimizer run.

        Parameters:
        error - An error that occured during the optimizer run.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • compactionMetrics

        TableOptimizerRun.Builder compactionMetrics​(CompactionMetrics compactionMetrics)

        A CompactionMetrics object containing metrics for the optimizer run.

        Parameters:
        compactionMetrics - A CompactionMetrics object containing metrics for the optimizer run.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • compactionStrategy

        TableOptimizerRun.Builder compactionStrategy​(String compactionStrategy)

        The strategy used for the compaction run. Indicates which algorithm was applied to determine how files were selected and combined during the compaction process. Valid values are:

        • binpack: Combines small files into larger files, typically targeting sizes over 100MB, while applying any pending deletes. This is the recommended compaction strategy for most use cases.

        • sort: Organizes data based on specified columns which are sorted hierarchically during compaction, improving query performance for filtered operations. This strategy is recommended when your queries frequently filter on specific columns. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        • z-order: Optimizes data organization by blending multiple attributes into a single scalar value that can be used for sorting, allowing efficient querying across multiple dimensions. This strategy is recommended when you need to query data across multiple dimensions simultaneously. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        Parameters:
        compactionStrategy - The strategy used for the compaction run. Indicates which algorithm was applied to determine how files were selected and combined during the compaction process. Valid values are:

        • binpack: Combines small files into larger files, typically targeting sizes over 100MB, while applying any pending deletes. This is the recommended compaction strategy for most use cases.

        • sort: Organizes data based on specified columns which are sorted hierarchically during compaction, improving query performance for filtered operations. This strategy is recommended when your queries frequently filter on specific columns. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        • z-order: Optimizes data organization by blending multiple attributes into a single scalar value that can be used for sorting, allowing efficient querying across multiple dimensions. This strategy is recommended when you need to query data across multiple dimensions simultaneously. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        CompactionStrategy, CompactionStrategy
      • compactionStrategy

        TableOptimizerRun.Builder compactionStrategy​(CompactionStrategy compactionStrategy)

        The strategy used for the compaction run. Indicates which algorithm was applied to determine how files were selected and combined during the compaction process. Valid values are:

        • binpack: Combines small files into larger files, typically targeting sizes over 100MB, while applying any pending deletes. This is the recommended compaction strategy for most use cases.

        • sort: Organizes data based on specified columns which are sorted hierarchically during compaction, improving query performance for filtered operations. This strategy is recommended when your queries frequently filter on specific columns. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        • z-order: Optimizes data organization by blending multiple attributes into a single scalar value that can be used for sorting, allowing efficient querying across multiple dimensions. This strategy is recommended when you need to query data across multiple dimensions simultaneously. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        Parameters:
        compactionStrategy - The strategy used for the compaction run. Indicates which algorithm was applied to determine how files were selected and combined during the compaction process. Valid values are:

        • binpack: Combines small files into larger files, typically targeting sizes over 100MB, while applying any pending deletes. This is the recommended compaction strategy for most use cases.

        • sort: Organizes data based on specified columns which are sorted hierarchically during compaction, improving query performance for filtered operations. This strategy is recommended when your queries frequently filter on specific columns. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        • z-order: Optimizes data organization by blending multiple attributes into a single scalar value that can be used for sorting, allowing efficient querying across multiple dimensions. This strategy is recommended when you need to query data across multiple dimensions simultaneously. To use this strategy, you must first define a sort order in your Iceberg table properties using the sort_order table property.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        CompactionStrategy, CompactionStrategy
      • retentionMetrics

        TableOptimizerRun.Builder retentionMetrics​(RetentionMetrics retentionMetrics)

        A RetentionMetrics object containing metrics for the optimizer run.

        Parameters:
        retentionMetrics - A RetentionMetrics object containing metrics for the optimizer run.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • orphanFileDeletionMetrics

        TableOptimizerRun.Builder orphanFileDeletionMetrics​(OrphanFileDeletionMetrics orphanFileDeletionMetrics)

        An OrphanFileDeletionMetrics object containing metrics for the optimizer run.

        Parameters:
        orphanFileDeletionMetrics - An OrphanFileDeletionMetrics object containing metrics for the optimizer run.
        Returns:
        Returns a reference to this object so that method calls can be chained together.