public class HoodieRealtimeRecordReaderUtils extends Object
| Constructor and Description |
|---|
HoodieRealtimeRecordReaderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.avro.Schema |
addPartitionFields(org.apache.avro.Schema schema,
List<String> partitioningFields)
Hive implementation of ParquetRecordReader results in partition columns not present in the original parquet file to
also be part of the projected schema.
|
static String |
arrayWritableToString(org.apache.hadoop.io.ArrayWritable writable)
Prints a JSON representation of the ArrayWritable for easier debuggability.
|
static org.apache.hadoop.io.Writable |
avroToArrayWritable(Object value,
org.apache.avro.Schema schema)
Convert the projected read from delta record into an array writable.
|
static org.apache.hadoop.io.Writable |
avroToArrayWritable(Object value,
org.apache.avro.Schema schema,
boolean supportTimestamp) |
static org.apache.avro.Schema |
generateProjectionSchema(org.apache.avro.Schema writeSchema,
Map<String,org.apache.avro.Schema.Field> schemaFieldsMap,
List<String> fieldNames)
Generate a reader schema off the provided writeSchema, to just project out the provided columns.
|
static HoodieFileReader |
getBaseFileReader(org.apache.hadoop.fs.Path path,
org.apache.hadoop.mapred.JobConf conf) |
static long |
getMaxCompactionMemoryInBytes(org.apache.hadoop.mapred.JobConf jobConf)
get the max compaction memory in bytes from JobConf.
|
static Map<String,org.apache.avro.Schema.Field> |
getNameToFieldMap(org.apache.avro.Schema schema) |
static List<String> |
orderFields(String fieldNameCsv,
String fieldOrderCsv,
List<String> partitioningFields)
Given a comma separated list of field names and positions at which they appear on Hive, return
an ordered list of field names, that can be passed onto storage.
|
public static long getMaxCompactionMemoryInBytes(org.apache.hadoop.mapred.JobConf jobConf)
public static String arrayWritableToString(org.apache.hadoop.io.ArrayWritable writable)
public static org.apache.avro.Schema generateProjectionSchema(org.apache.avro.Schema writeSchema,
Map<String,org.apache.avro.Schema.Field> schemaFieldsMap,
List<String> fieldNames)
public static Map<String,org.apache.avro.Schema.Field> getNameToFieldMap(org.apache.avro.Schema schema)
public static org.apache.hadoop.io.Writable avroToArrayWritable(Object value, org.apache.avro.Schema schema)
public static org.apache.hadoop.io.Writable avroToArrayWritable(Object value, org.apache.avro.Schema schema, boolean supportTimestamp)
public static List<String> orderFields(String fieldNameCsv, String fieldOrderCsv, List<String> partitioningFields)
public static org.apache.avro.Schema addPartitionFields(org.apache.avro.Schema schema,
List<String> partitioningFields)
schema - Schema to be changedpublic static HoodieFileReader getBaseFileReader(org.apache.hadoop.fs.Path path, org.apache.hadoop.mapred.JobConf conf) throws IOException
IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.