public class NiFiOrcUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.hadoop.hive.ql.io.orc.MemoryManager |
memoryManager |
| Constructor and Description |
|---|
NiFiOrcUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
convertToORCObject(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo,
Object o) |
static org.apache.hadoop.hive.ql.io.orc.OrcStruct |
createOrcStruct(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo,
Object... objs)
Create an object of OrcStruct given a TypeInfo and a list of objects
|
static OrcFlowFileWriter |
createWriter(OutputStream flowFileOutputStream,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hive.serde2.typeinfo.TypeInfo orcSchema,
long stripeSize,
org.apache.hadoop.hive.ql.io.orc.CompressionKind compress,
int bufferSize) |
static String |
generateHiveDDL(org.apache.avro.Schema avroSchema,
String tableName) |
static org.apache.avro.Schema.Type |
getAvroSchemaTypeOfObject(Object o) |
static String |
getHiveTypeFromAvroType(org.apache.avro.Schema avroSchema) |
static String |
getHiveTypeFromFieldType(DataType rawDataType,
boolean hiveFieldNames) |
private static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo |
getLogicalTypeInfo(org.apache.avro.Schema schema) |
private static org.apache.hadoop.hive.ql.io.orc.MemoryManager |
getMemoryManager(org.apache.hadoop.conf.Configuration conf) |
static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo |
getOrcField(org.apache.avro.Schema fieldSchema) |
static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo |
getPrimitiveOrcTypeFromPrimitiveAvroType(org.apache.avro.Schema.Type avroType) |
private static boolean |
isLogicalType(org.apache.avro.Schema schema) |
static String |
normalizeHiveTableName(String name) |
private static org.apache.hadoop.hive.ql.io.orc.MemoryManager memoryManager
public static Object convertToORCObject(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo, Object o)
public static org.apache.hadoop.hive.ql.io.orc.OrcStruct createOrcStruct(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo,
Object... objs)
typeInfo - The TypeInfo object representing the ORC record schemaobjs - ORC objects/Writablespublic static String generateHiveDDL(org.apache.avro.Schema avroSchema, String tableName)
public static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo getOrcField(org.apache.avro.Schema fieldSchema)
throws IllegalArgumentException
IllegalArgumentExceptionprivate static boolean isLogicalType(org.apache.avro.Schema schema)
private static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo getLogicalTypeInfo(org.apache.avro.Schema schema)
public static org.apache.avro.Schema.Type getAvroSchemaTypeOfObject(Object o)
public static org.apache.hadoop.hive.serde2.typeinfo.TypeInfo getPrimitiveOrcTypeFromPrimitiveAvroType(org.apache.avro.Schema.Type avroType)
throws IllegalArgumentException
IllegalArgumentExceptionpublic static String getHiveTypeFromAvroType(org.apache.avro.Schema avroSchema)
public static String getHiveTypeFromFieldType(DataType rawDataType, boolean hiveFieldNames)
public static OrcFlowFileWriter createWriter(OutputStream flowFileOutputStream, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hive.serde2.typeinfo.TypeInfo orcSchema, long stripeSize, org.apache.hadoop.hive.ql.io.orc.CompressionKind compress, int bufferSize) throws IOException
IOExceptionprivate static org.apache.hadoop.hive.ql.io.orc.MemoryManager getMemoryManager(org.apache.hadoop.conf.Configuration conf)
Copyright © 2023 Apache NiFi Project. All rights reserved.