Class ParquetInstructions
java.lang.Object
com.illumon.iris.db.v2.locations.parquet.ParquetInstructions
- All Implemented Interfaces:
ColumnToCodecMappings
public abstract class ParquetInstructions extends Object implements ColumnToCodecMappings
This class provides instructions intended for read and write parquet operations (which take it as an optional
argument) specifying desired transformations. Examples are mapping column names and use of specific codecs during
(de)serialization.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParquetInstructions.Builder
-
Field Summary
Fields Modifier and Type Field Description static ParquetInstructions
EMPTY
-
Constructor Summary
Constructors Constructor Description ParquetInstructions()
-
Method Summary
-
Field Details
-
Constructor Details
-
ParquetInstructions
public ParquetInstructions()
-
-
Method Details
-
setDefaultCompressionCodecName
Set the default forgetCompressionCodecName()
.- Parameters:
name
- The new default- See Also:
ParquetInstructions.Builder.setCompressionCodecName(String)
-
getDefaultCompressionCodecName
- Returns:
- The default for
getCompressionCodecName()
-
setDefaultMaximumDictionaryKeys
public static void setDefaultMaximumDictionaryKeys(int maximumDictionaryKeys)Set the default forgetMaximumDictionaryKeys()
.- Parameters:
maximumDictionaryKeys
- The new default- See Also:
ParquetInstructions.Builder.setMaximumDictionaryKeys(int)
-
getDefaultMaximumDictionaryKeys
public static int getDefaultMaximumDictionaryKeys()- Returns:
- The default for
getMaximumDictionaryKeys()
-
setDefaultTargetPageSize
public static void setDefaultTargetPageSize(int newDefaultSizeBytes)Set the default target page size (in bytes) used to section rows of data into pages during column writing. This number should be no smaller than 65536.- Parameters:
newDefaultSizeBytes
- the new default target page size.
-
getDefaultTargetPageSize
public static int getDefaultTargetPageSize()Get the current default target page size in bytes.- Returns:
- the current default target page size in bytes.
-
getColumnNameFromParquetColumnNameOrDefault
-
getParquetColumnNameFromColumnNameOrDefault
-
getColumnNameFromParquetColumnName
-
getCodecName
- Specified by:
getCodecName
in interfaceColumnToCodecMappings
-
getCodecArgs
- Specified by:
getCodecArgs
in interfaceColumnToCodecMappings
-
useDictionary
- Returns:
- A hint that the writer should use dictionary-based encoding for writing this column; never evaluated for non-String columns, defaults to false
-
getCompressionCodecName
-
getMaximumDictionaryKeys
public abstract int getMaximumDictionaryKeys()- Returns:
- The maximum number of unique keys the writer should add to a dictionary page before switching to
non-dictionary encoding; never evaluated for non-String columns, ignored if
useDictionary(String)
-
isLegacyParquet
public abstract boolean isLegacyParquet() -
getTargetPageSize
public abstract int getTargetPageSize() -
sameColumnNamesAndCodecMappings
@VisibleForTesting public static boolean sameColumnNamesAndCodecMappings(ParquetInstructions i1, ParquetInstructions i2) -
builder
-