Class MetricsConfig

java.lang.Object
org.apache.iceberg.MetricsConfig
All Implemented Interfaces:
Serializable

@Immutable public final class MetricsConfig extends Object implements Serializable
See Also:
  • Method Details

    • getDefault

      public static MetricsConfig getDefault()
    • forPositionDelete

      public static MetricsConfig forPositionDelete()
    • fromProperties

      @Deprecated public static MetricsConfig fromProperties(Map<String,String> props)
      Deprecated.
      use forTable(Table). Will be removed in 2.0.0
      Creates a metrics config from table configuration.
      Parameters:
      props - table configuration
    • forTable

      public static MetricsConfig forTable(Table table)
      Creates a metrics config from a table.
      Parameters:
      table - iceberg table
    • forPositionDelete

      @Deprecated public static MetricsConfig forPositionDelete(Table table)
      Deprecated.
      This method is deprecated as of version 1.11.0 and will be removed in 1.12.0. Position deletes that include row data are no longer supported. Use forPositionDelete() instead.
      Creates a metrics config for a position delete file.
      Parameters:
      table - an Iceberg table
    • from

      public static MetricsConfig from(Map<String,String> props, Schema schema, SortOrder order)
      Generate a MetricsConfig for all columns based on overrides, schema, and sort order.
      Parameters:
      props - will be read for metrics overrides (write.metadata.metrics.column.*) and default (write.metadata.metrics.default)
      schema - table schema
      order - sort order columns, will be promoted to truncate(16)
      Returns:
      metrics configuration
    • validateReferencedColumns

      public void validateReferencedColumns(Schema schema)
    • columnMode

      public MetricsModes.MetricsMode columnMode(String columnAlias)