Package org.apache.gravitino.policy
Class IcebergDataCompactionContent
java.lang.Object
org.apache.gravitino.policy.IcebergDataCompactionContent
- All Implemented Interfaces:
PolicyContent
Built-in policy content for Iceberg compaction strategy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMetric name for data file MSE.static final StringRule key for data file MSE score weight.static final longDefault score weight for data file MSE.static final longDefault score weight for delete file number.static final longDefault max partition number for compaction.static final longDefault minimum threshold for data file MSE metric, equals (128 MiB * 0.15)^2.static final longDefault minimum threshold for delete file number metric.Default rewrite options for Iceberg rewrite data files.static final StringMetric name for delete file number.static final StringRule key for delete file number score weight.static final StringPrefix for rewrite options propagated to job options.static final StringProperty key for job template name.static final StringBuilt-in job template name for Iceberg rewrite data files.static final StringRule key for max partition number selected for compaction.static final StringRule key for minimum data file MSE threshold.static final StringRule key for minimum delete file count threshold.static final StringRule key for score expression.static final StringProperty key for strategy type.static final StringStrategy type value for iceberg data compaction.static final StringRule key for trigger expression. -
Method Summary
Modifier and TypeMethodDescriptionReturns the weight used by "custom-data-file-mse" in score expression.Returns the weight used by "custom-delete-file-number" in score expression.booleaninthashCode()Returns max partition number selected for compaction.Returns the minimum threshold for "custom-data-file-mse".Returns the minimum threshold for "custom-delete-file-number".Returns rewrite options that are expanded tojob.options.*rule entries.rules()A convenience method to get all rules in the policy content.toString()voidvalidate()Validates the policy content.
-
Field Details
-
STRATEGY_TYPE_KEY
Property key for strategy type.- See Also:
-
STRATEGY_TYPE_VALUE
Strategy type value for iceberg data compaction.- See Also:
-
JOB_TEMPLATE_NAME_KEY
Property key for job template name.- See Also:
-
JOB_TEMPLATE_NAME_VALUE
Built-in job template name for Iceberg rewrite data files.- See Also:
-
JOB_OPTIONS_PREFIX
Prefix for rewrite options propagated to job options.- See Also:
-
TRIGGER_EXPR_KEY
Rule key for trigger expression.- See Also:
-
SCORE_EXPR_KEY
Rule key for score expression.- See Also:
-
MIN_DATA_FILE_MSE_KEY
Rule key for minimum data file MSE threshold.- See Also:
-
MIN_DELETE_FILE_NUMBER_KEY
Rule key for minimum delete file count threshold.- See Also:
-
DATA_FILE_MSE_WEIGHT_KEY
Rule key for data file MSE score weight.- See Also:
-
DELETE_FILE_NUMBER_WEIGHT_KEY
Rule key for delete file number score weight.- See Also:
-
MAX_PARTITION_NUM_KEY
Rule key for max partition number selected for compaction.- See Also:
-
DATA_FILE_MSE_METRIC
Metric name for data file MSE.- See Also:
-
DELETE_FILE_NUMBER_METRIC
Metric name for delete file number.- See Also:
-
DEFAULT_MIN_DATA_FILE_MSE
public static final long DEFAULT_MIN_DATA_FILE_MSEDefault minimum threshold for data file MSE metric, equals (128 MiB * 0.15)^2.- See Also:
-
DEFAULT_MIN_DELETE_FILE_NUMBER
public static final long DEFAULT_MIN_DELETE_FILE_NUMBERDefault minimum threshold for delete file number metric.- See Also:
-
DEFAULT_DATA_FILE_MSE_WEIGHT
public static final long DEFAULT_DATA_FILE_MSE_WEIGHTDefault score weight for data file MSE.- See Also:
-
DEFAULT_DELETE_FILE_NUMBER_WEIGHT
public static final long DEFAULT_DELETE_FILE_NUMBER_WEIGHTDefault score weight for delete file number.- See Also:
-
DEFAULT_MAX_PARTITION_NUM
public static final long DEFAULT_MAX_PARTITION_NUMDefault max partition number for compaction.- See Also:
-
DEFAULT_REWRITE_OPTIONS
Default rewrite options for Iceberg rewrite data files.
-
-
Method Details
-
minDataFileMse
Returns the minimum threshold for "custom-data-file-mse".- Returns:
- minimum data file MSE threshold
-
minDeleteFileNumber
Returns the minimum threshold for "custom-delete-file-number".- Returns:
- minimum delete file number threshold
-
dataFileMseWeight
Returns the weight used by "custom-data-file-mse" in score expression.- Returns:
- data file MSE score weight
-
deleteFileNumberWeight
Returns the weight used by "custom-delete-file-number" in score expression.- Returns:
- delete file number score weight
-
maxPartitionNum
Returns max partition number selected for compaction.- Returns:
- max partition number
-
rewriteOptions
Returns rewrite options that are expanded tojob.options.*rule entries.- Returns:
- rewrite options
-
supportedObjectTypes
- Specified by:
supportedObjectTypesin interfacePolicyContent- Returns:
- the set of metadata object types that the policy can be applied to
-
properties
- Specified by:
propertiesin interfacePolicyContent- Returns:
- The additional properties of the policy.
-
rules
Description copied from interface:PolicyContentA convenience method to get all rules in the policy content.- Specified by:
rulesin interfacePolicyContent- Returns:
- A map of rule names to their corresponding rule objects.
-
validate
Description copied from interface:PolicyContentValidates the policy content.- Specified by:
validatein interfacePolicyContent- Throws:
IllegalArgumentException- if the content is invalid.
-
equals
-
hashCode
public int hashCode() -
toString
-