Package com.illumon.iris.db.v2.parquet
Class ParquetTableWriter
java.lang.Object
com.illumon.iris.db.v2.parquet.ParquetTableWriter
public class ParquetTableWriter extends Object
API for writing DH tables in parquet format
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParquetTableWriter.DestinationInfo
Information about a writing destination (e.g. -
Field Summary
Fields Modifier and Type Field Description static String
BEGIN_POS
static String
END_POS
static String
GROUPING_KEY
static String
METADATA_KEY
static String
PARQUET_FILE_EXTENSION
-
Constructor Summary
Constructors Constructor Description ParquetTableWriter()
-
Method Summary
Modifier and Type Method Description static Function<String,String>
defaultGroupingFileName(String path)
static void
write(Table table, TableDefinition definition, ParquetInstructions writeInstructions, String path, Map<String,String> tableMeta, TableInfo.Builder tableInfoBuilder)
Writes a table in parquet format under a given pathstatic void
write(Table t, TableDefinition definition, ParquetInstructions writeInstructions, String path, Map<String,String> incomingMeta, String... groupingColumns)
Writes a table in parquet format under a given pathstatic void
write(Table t, TableDefinition definition, ParquetInstructions writeInstructions, String destPathName, Map<String,String> incomingMeta, Function<String,String> groupingPathFactory, String... groupingColumns)
Writes a table in parquet format under a given pathstatic void
write(Table t, String path, Map<String,String> incomingMeta, String... groupingColumns)
Writes a table in parquet format under a given pathstatic void
write(Table t, String path, Map<String,String> incomingMeta, Function<String,String> groupingPathFactory, String... groupingColumns)
Writes a table in parquet format under a given pathstatic void
write(ParquetTableWriter.DestinationInfo[] destinationInfos, ParquetInstructions instructions, TableDefinition definition, ExecutorService executorService, int maxConcurrentColumns)
Writes a table in parquet format under a given path
-
Field Details
-
METADATA_KEY
- See Also:
- Constant Field Values
-
BEGIN_POS
- See Also:
- Constant Field Values
-
END_POS
- See Also:
- Constant Field Values
-
GROUPING_KEY
- See Also:
- Constant Field Values
-
PARQUET_FILE_EXTENSION
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ParquetTableWriter
public ParquetTableWriter()
-
-
Method Details
-
defaultGroupingFileName
-
write
public static void write(@NotNull ParquetTableWriter.DestinationInfo[] destinationInfos, @NotNull ParquetInstructions instructions, @NotNull TableDefinition definition, @NotNull ExecutorService executorService, int maxConcurrentColumns) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
destinationInfos
- Destination information coupling input data, output path, and grouping metadata for each desired result tableinstructions
- TheParquetInstructions
containing write directives.definition
- The definition to use for the output tables- Throws:
SchemaMappingException
- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException
- For file writing related errors
-
write
public static void write(@NotNull Table t, @NotNull String path, @NotNull Map<String,String> incomingMeta, @NotNull Function<String,String> groupingPathFactory, String... groupingColumns) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
t
- The table to writepath
- The destination pathincomingMeta
- A map of metadata values to be stores in the file footergroupingPathFactory
- a factory to construct paths for grouping tables.groupingColumns
- List of columns the tables are grouped by (the write operation will store the grouping info)- Throws:
SchemaMappingException
- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException
- For file writing related errors
-
write
public static void write(@NotNull Table t, @NotNull String path, @NotNull Map<String,String> incomingMeta, String... groupingColumns) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
t
- the table to writepath
- the destination pathincomingMeta
- any metadata to include in the parquet metadatagroupingColumns
- the grouping columns (if any)- Throws:
SchemaMappingException
IOException
-
write
public static void write(@NotNull Table t, @NotNull TableDefinition definition, @NotNull ParquetInstructions writeInstructions, @NotNull String destPathName, @NotNull Map<String,String> incomingMeta, @NotNull Function<String,String> groupingPathFactory, String... groupingColumns) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
t
- The table to writedefinition
- Table definitionwriteInstructions
- Write instructions for customizations while writingdestPathName
- The destination pathincomingMeta
- A map of metadata values to be stores in the file footergroupingPathFactory
- a factory for constructing paths for grouping tablesgroupingColumns
- List of columns the tables are grouped by (the write operation will store the grouping info)- Throws:
SchemaMappingException
- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException
- For file writing related errors
-
write
public static void write(@NotNull Table t, @NotNull TableDefinition definition, @NotNull ParquetInstructions writeInstructions, @NotNull String path, @NotNull Map<String,String> incomingMeta, String... groupingColumns) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
t
- the table to writedefinition
- the writable table definitionwriteInstructions
- the parquet instructions for writingpath
- the path to write toincomingMeta
- any metadata to include ih the parquet metadatagroupingColumns
- the grouping columns (if any)- Throws:
SchemaMappingException
IOException
-
write
public static void write(@NotNull Table table, @NotNull TableDefinition definition, @NotNull ParquetInstructions writeInstructions, @NotNull String path, @NotNull Map<String,String> tableMeta, @NotNull TableInfo.Builder tableInfoBuilder) throws SchemaMappingException, IOExceptionWrites a table in parquet format under a given path- Parameters:
table
- The table to writedefinition
- The table definitionwriteInstructions
- Write instructions for customizations while writingpath
- The destination pathtableMeta
- A map of metadata values to be stores in the file footertableInfoBuilder
- A partially-constructed builder for the metadata object- Throws:
SchemaMappingException
- Error creating a parquet table schema for the given table (likely due to unsupported types)IOException
- For file writing related errors
-