public class AvroLazyObjectInspector extends LazySimpleStructObjectInspector
BaseStructObjectInspector.MyField
ObjectInspector.Category
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG
LOGGER
|
fields
Constructor and Description |
---|
AvroLazyObjectInspector(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors,
List<String> structFieldComments,
byte separator,
LazyObjectInspectorParameters lazyParams) |
AvroLazyObjectInspector(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors,
List<String> structFieldComments,
byte separator,
org.apache.hadoop.io.Text nullSequence,
boolean lastColumnTakesRest,
boolean escaped,
byte escapeChar)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Object |
getStructFieldData(Object data,
StructField f)
returns null for data = null.
|
List<Object> |
getStructFieldsDataAsList(Object data)
returns null for data = null.
|
void |
setReaderSchema(org.apache.avro.Schema readerSchema)
Set the reader schema for the
AvroLazyObjectInspector to the given schema |
void |
setSchemaRetriever(AvroSchemaRetriever schemaRetriever)
Set the
AvroSchemaRetriever for the AvroLazyObjectInspector to the given class |
getEscapeChar, getLastColumnTakesRest, getLazyParams, getNullSequence, getSeparator, init, init, isEscaped
createField, getAllStructFieldRefs, getCategory, getStructFieldRef, getTypeName, init, init
isSettable, toString
@Deprecated public AvroLazyObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments, byte separator, org.apache.hadoop.io.Text nullSequence, boolean lastColumnTakesRest, boolean escaped, byte escapeChar)
structFieldNames
- fields within the given protobuf objectstructFieldObjectInspectors
- object inspectors for the fieldsstructFieldComments
- comments for the given fieldsseparator
- separator between different fieldsnullSequence
- sequence to represent null valuelastColumnTakesRest
- whether the last column of the struct should take the rest of the
row if there are extra fields.escaped
- whether the data is escaped or notescapeChar
- if escaped is true, the escape characterpublic AvroLazyObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments, byte separator, LazyObjectInspectorParameters lazyParams)
public void setReaderSchema(org.apache.avro.Schema readerSchema)
AvroLazyObjectInspector
to the given schemapublic void setSchemaRetriever(AvroSchemaRetriever schemaRetriever)
AvroSchemaRetriever
for the AvroLazyObjectInspector
to the given classscheamRetrieverClass
- the schema retriever class to be setpublic Object getStructFieldData(Object data, StructField f)
StructObjectInspector
getStructFieldData
in class LazySimpleStructObjectInspector
public List<Object> getStructFieldsDataAsList(Object data)
StructObjectInspector
getStructFieldsDataAsList
in class LazySimpleStructObjectInspector
Copyright © 2017 The Apache Software Foundation. All rights reserved.