Class DeleteOrphanFiles.Builder

java.lang.Object
org.apache.iceberg.flink.maintenance.api.MaintenanceTaskBuilder<DeleteOrphanFiles.Builder>
org.apache.iceberg.flink.maintenance.api.DeleteOrphanFiles.Builder
Enclosing class:
DeleteOrphanFiles

public static class DeleteOrphanFiles.Builder extends MaintenanceTaskBuilder<DeleteOrphanFiles.Builder>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • location

      public DeleteOrphanFiles.Builder location(String newLocation)
      The location to start the recursive listing the candidate files for removal. By default, the Table.location() is used.
      Parameters:
      newLocation - the task will scan
      Returns:
      for chained calls
    • usePrefixListing

      public DeleteOrphanFiles.Builder usePrefixListing(boolean newUsePrefixListing)
      Whether to use prefix listing when listing files from the file system.
      Parameters:
      newUsePrefixListing - true to enable prefix listing, false otherwise
      Returns:
      for chained calls
    • prefixMismatchMode

      public DeleteOrphanFiles.Builder prefixMismatchMode(DeleteOrphanFiles.PrefixMismatchMode newPrefixMismatchMode)
      Action behavior when location prefixes (schemes/authorities) mismatch.
      Parameters:
      newPrefixMismatchMode - to action when mismatch
      Returns:
      for chained calls
    • minAge

      public DeleteOrphanFiles.Builder minAge(Duration newMinAge)
      The files newer than this age will not be removed.
      Parameters:
      newMinAge - of the files to be removed
      Returns:
      for chained calls
    • planningWorkerPoolSize

      public DeleteOrphanFiles.Builder planningWorkerPoolSize(int newPlanningWorkerPoolSize)
      The worker pool size used for planning the scan of the MetadataTableType.ALL_FILES table. This scan is used for determining the files used by the table.
      Parameters:
      newPlanningWorkerPoolSize - for scanning
      Returns:
      for chained calls
    • equalSchemes

      public DeleteOrphanFiles.Builder equalSchemes(Map<String,String> newEqualSchemes)
      Passes schemes that should be considered equal.

      The key may include a comma-separated list of schemes. For instance, Map("s3a,s3,s3n","s3").

      Parameters:
      newEqualSchemes - list of equal schemes
      Returns:
      this for method chaining
    • equalAuthorities

      public DeleteOrphanFiles.Builder equalAuthorities(Map<String,String> newEqualAuthorities)
      Passes authorities that should be considered equal.

      The key may include a comma-separate list of authorities. For instance, Map("s1name,s2name","servicename").

      Parameters:
      newEqualAuthorities - list of equal authorities
      Returns:
      this for method chaining
    • deleteBatchSize

      public DeleteOrphanFiles.Builder deleteBatchSize(int newDeleteBatchSize)
      Size of the batch used to deleting the files.
      Parameters:
      newDeleteBatchSize - number of batch file
      Returns:
      for chained calls