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 1.13.0
      Creates a metrics config from table configuration.
      Parameters:
      props - table configuration
    • validate

      public static void validate(Map<String,String> props, Schema schema)
      Validates metrics config properties with the given schema.
      Parameters:
      props - table properties
      schema - table schema
    • forTable

      public static MetricsConfig forTable(Table table)
      Creates a metrics config from a table.
      Parameters:
      table - iceberg table
      Returns:
      a metrics config for the given table
    • metricsFieldIds

      public Iterable<Integer> metricsFieldIds()
    • columnMode

      public MetricsModes.MetricsMode columnMode(int id)
    • columnMode

      public MetricsModes.MetricsMode columnMode(String columnAlias)
    • validateReferencedColumns

      public void validateReferencedColumns(Schema schema)
    • 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