public enum DeleteGranularity extends java.lang.Enum<DeleteGranularity>
Under partition granularity, delete writers are directed to group deletes for different data files into one delete file. This strategy tends to reduce the total number of delete files in the table. However, a scan for a single data file will require reading delete information for multiple data files even if those other files are not required for the scan. All irrelevant deletes will be discarded by readers but reading this extra information will cause overhead. The overhead can potentially be mitigated via delete file caching.
Under file granularity, delete writers always organize deletes by their target data file, creating separate delete files for each referenced data file. This strategy ensures the job planning does not assign irrelevant deletes to data files and readers only load necessary delete information. However, it also increases the total number of delete files in the table and may require a more aggressive approach for delete file compaction.
Currently, this configuration is only applicable to position deletes.
Each granularity has its own benefits and drawbacks and should be picked based on a use case. Regular delete compaction is still required regardless of which granularity is chosen. It is also possible to use one granularity for ingestion and another one for table maintenance.
Modifier and Type | Method and Description |
---|---|
static DeleteGranularity |
fromString(java.lang.String valueAsString) |
java.lang.String |
toString() |
static DeleteGranularity |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DeleteGranularity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DeleteGranularity FILE
public static final DeleteGranularity PARTITION
public static DeleteGranularity[] values()
for (DeleteGranularity c : DeleteGranularity.values()) System.out.println(c);
public static DeleteGranularity valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<DeleteGranularity>
public static DeleteGranularity fromString(java.lang.String valueAsString)