Class JsonRecordWriter
java.lang.Object
org.apache.drill.exec.store.AbstractRecordWriter
org.apache.drill.exec.store.JSONOutputRecordWriter
org.apache.drill.exec.store.easy.json.JsonRecordWriter
- All Implemented Interfaces:
RecordWriter
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
class
class
Nested classes/interfaces inherited from class org.apache.drill.exec.store.JSONOutputRecordWriter
JSONOutputRecordWriter.BigIntJsonConverter, JSONOutputRecordWriter.BitJsonConverter, JSONOutputRecordWriter.DateJsonConverter, JSONOutputRecordWriter.Decimal18JsonConverter, JSONOutputRecordWriter.Decimal28DenseJsonConverter, JSONOutputRecordWriter.Decimal28SparseJsonConverter, JSONOutputRecordWriter.Decimal38DenseJsonConverter, JSONOutputRecordWriter.Decimal38SparseJsonConverter, JSONOutputRecordWriter.Decimal9JsonConverter, JSONOutputRecordWriter.Float4JsonConverter, JSONOutputRecordWriter.Float8JsonConverter, JSONOutputRecordWriter.IntervalDayJsonConverter, JSONOutputRecordWriter.IntervalJsonConverter, JSONOutputRecordWriter.IntervalYearJsonConverter, JSONOutputRecordWriter.IntJsonConverter, JSONOutputRecordWriter.NullableBigIntJsonConverter, JSONOutputRecordWriter.NullableBitJsonConverter, JSONOutputRecordWriter.NullableDateJsonConverter, JSONOutputRecordWriter.NullableDecimal18JsonConverter, JSONOutputRecordWriter.NullableDecimal28DenseJsonConverter, JSONOutputRecordWriter.NullableDecimal28SparseJsonConverter, JSONOutputRecordWriter.NullableDecimal38DenseJsonConverter, JSONOutputRecordWriter.NullableDecimal38SparseJsonConverter, JSONOutputRecordWriter.NullableDecimal9JsonConverter, JSONOutputRecordWriter.NullableFloat4JsonConverter, JSONOutputRecordWriter.NullableFloat8JsonConverter, JSONOutputRecordWriter.NullableIntervalDayJsonConverter, JSONOutputRecordWriter.NullableIntervalJsonConverter, JSONOutputRecordWriter.NullableIntervalYearJsonConverter, JSONOutputRecordWriter.NullableIntJsonConverter, JSONOutputRecordWriter.NullableSmallIntJsonConverter, JSONOutputRecordWriter.NullableTimeJsonConverter, JSONOutputRecordWriter.NullableTimeStampJsonConverter, JSONOutputRecordWriter.NullableTinyIntJsonConverter, JSONOutputRecordWriter.NullableUInt1JsonConverter, JSONOutputRecordWriter.NullableUInt2JsonConverter, JSONOutputRecordWriter.NullableUInt4JsonConverter, JSONOutputRecordWriter.NullableUInt8JsonConverter, JSONOutputRecordWriter.NullableVar16CharJsonConverter, JSONOutputRecordWriter.NullableVarBinaryJsonConverter, JSONOutputRecordWriter.NullableVarCharJsonConverter, JSONOutputRecordWriter.NullableVarDecimalJsonConverter, JSONOutputRecordWriter.RepeatedBigIntJsonConverter, JSONOutputRecordWriter.RepeatedBitJsonConverter, JSONOutputRecordWriter.RepeatedDateJsonConverter, JSONOutputRecordWriter.RepeatedDecimal18JsonConverter, JSONOutputRecordWriter.RepeatedDecimal28DenseJsonConverter, JSONOutputRecordWriter.RepeatedDecimal28SparseJsonConverter, JSONOutputRecordWriter.RepeatedDecimal38DenseJsonConverter, JSONOutputRecordWriter.RepeatedDecimal38SparseJsonConverter, JSONOutputRecordWriter.RepeatedDecimal9JsonConverter, JSONOutputRecordWriter.RepeatedFloat4JsonConverter, JSONOutputRecordWriter.RepeatedFloat8JsonConverter, JSONOutputRecordWriter.RepeatedIntervalDayJsonConverter, JSONOutputRecordWriter.RepeatedIntervalJsonConverter, JSONOutputRecordWriter.RepeatedIntervalYearJsonConverter, JSONOutputRecordWriter.RepeatedIntJsonConverter, JSONOutputRecordWriter.RepeatedSmallIntJsonConverter, JSONOutputRecordWriter.RepeatedTimeJsonConverter, JSONOutputRecordWriter.RepeatedTimeStampJsonConverter, JSONOutputRecordWriter.RepeatedTinyIntJsonConverter, JSONOutputRecordWriter.RepeatedUInt1JsonConverter, JSONOutputRecordWriter.RepeatedUInt2JsonConverter, JSONOutputRecordWriter.RepeatedUInt4JsonConverter, JSONOutputRecordWriter.RepeatedUInt8JsonConverter, JSONOutputRecordWriter.RepeatedVar16CharJsonConverter, JSONOutputRecordWriter.RepeatedVarBinaryJsonConverter, JSONOutputRecordWriter.RepeatedVarCharJsonConverter, JSONOutputRecordWriter.RepeatedVarDecimalJsonConverter, JSONOutputRecordWriter.SmallIntJsonConverter, JSONOutputRecordWriter.TimeJsonConverter, JSONOutputRecordWriter.TimeStampJsonConverter, JSONOutputRecordWriter.TinyIntJsonConverter, JSONOutputRecordWriter.UInt1JsonConverter, JSONOutputRecordWriter.UInt2JsonConverter, JSONOutputRecordWriter.UInt4JsonConverter, JSONOutputRecordWriter.UInt8JsonConverter, JSONOutputRecordWriter.Var16CharJsonConverter, JSONOutputRecordWriter.VarBinaryJsonConverter, JSONOutputRecordWriter.VarCharJsonConverter, JSONOutputRecordWriter.VarDecimalJsonConverter
-
Field Summary
Fields inherited from class org.apache.drill.exec.store.JSONOutputRecordWriter
gen, skipNullFields
-
Constructor Summary
ConstructorDescriptionJsonRecordWriter
(StorageStrategy storageStrategy, org.apache.hadoop.conf.Configuration fsConf) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
void
cleanup()
void
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods.getNewMapConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewRepeatedListConverter
(int fieldId, String fieldName, FieldReader reader) getNewRepeatedMapConverter
(int fieldId, String fieldName, FieldReader reader) getNewUnionConverter
(int fieldId, String fieldName, FieldReader reader) void
Initialize the writer.void
Called before starting writing fields in a record.void
updateSchema
(VectorAccessible batch) Update the schema in RecordWriter.Methods inherited from class org.apache.drill.exec.store.JSONOutputRecordWriter
getNewBigIntConverter, getNewBitConverter, getNewDateConverter, getNewDecimal18Converter, getNewDecimal28DenseConverter, getNewDecimal28SparseConverter, getNewDecimal38DenseConverter, getNewDecimal38SparseConverter, getNewDecimal9Converter, getNewFloat4Converter, getNewFloat8Converter, getNewIntConverter, getNewIntervalConverter, getNewIntervalDayConverter, getNewIntervalYearConverter, getNewNullableBigIntConverter, getNewNullableBitConverter, getNewNullableDateConverter, getNewNullableDecimal18Converter, getNewNullableDecimal28DenseConverter, getNewNullableDecimal28SparseConverter, getNewNullableDecimal38DenseConverter, getNewNullableDecimal38SparseConverter, getNewNullableDecimal9Converter, getNewNullableFloat4Converter, getNewNullableFloat8Converter, getNewNullableIntConverter, getNewNullableIntervalConverter, getNewNullableIntervalDayConverter, getNewNullableIntervalYearConverter, getNewNullableSmallIntConverter, getNewNullableTimeConverter, getNewNullableTimeStampConverter, getNewNullableTinyIntConverter, getNewNullableUInt1Converter, getNewNullableUInt2Converter, getNewNullableUInt4Converter, getNewNullableUInt8Converter, getNewNullableVar16CharConverter, getNewNullableVarBinaryConverter, getNewNullableVarCharConverter, getNewNullableVarDecimalConverter, getNewRepeatedBigIntConverter, getNewRepeatedBitConverter, getNewRepeatedDateConverter, getNewRepeatedDecimal18Converter, getNewRepeatedDecimal28DenseConverter, getNewRepeatedDecimal28SparseConverter, getNewRepeatedDecimal38DenseConverter, getNewRepeatedDecimal38SparseConverter, getNewRepeatedDecimal9Converter, getNewRepeatedFloat4Converter, getNewRepeatedFloat8Converter, getNewRepeatedIntConverter, getNewRepeatedIntervalConverter, getNewRepeatedIntervalDayConverter, getNewRepeatedIntervalYearConverter, getNewRepeatedSmallIntConverter, getNewRepeatedTimeConverter, getNewRepeatedTimeStampConverter, getNewRepeatedTinyIntConverter, getNewRepeatedUInt1Converter, getNewRepeatedUInt2Converter, getNewRepeatedUInt4Converter, getNewRepeatedUInt8Converter, getNewRepeatedVar16CharConverter, getNewRepeatedVarBinaryConverter, getNewRepeatedVarCharConverter, getNewRepeatedVarDecimalConverter, getNewSmallIntConverter, getNewTimeConverter, getNewTimeStampConverter, getNewTinyIntConverter, getNewUInt1Converter, getNewUInt2Converter, getNewUInt4Converter, getNewUInt8Converter, getNewVar16CharConverter, getNewVarBinaryConverter, getNewVarCharConverter, getNewVarDecimalConverter
Methods inherited from class org.apache.drill.exec.store.AbstractRecordWriter
checkForNewPartition, getNewDictConverter, getNewRepeatedDictConverter, newPartition, postProcessing, setPartitionVector, supportsField
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.exec.store.RecordWriter
checkForNewPartition, getNewBigIntConverter, getNewBitConverter, getNewDateConverter, getNewDecimal18Converter, getNewDecimal28DenseConverter, getNewDecimal28SparseConverter, getNewDecimal38DenseConverter, getNewDecimal38SparseConverter, getNewDecimal9Converter, getNewDictConverter, getNewFloat4Converter, getNewFloat8Converter, getNewIntConverter, getNewIntervalConverter, getNewIntervalDayConverter, getNewIntervalYearConverter, getNewNullableBigIntConverter, getNewNullableBitConverter, getNewNullableDateConverter, getNewNullableDecimal18Converter, getNewNullableDecimal28DenseConverter, getNewNullableDecimal28SparseConverter, getNewNullableDecimal38DenseConverter, getNewNullableDecimal38SparseConverter, getNewNullableDecimal9Converter, getNewNullableFloat4Converter, getNewNullableFloat8Converter, getNewNullableIntConverter, getNewNullableIntervalConverter, getNewNullableIntervalDayConverter, getNewNullableIntervalYearConverter, getNewNullableSmallIntConverter, getNewNullableTimeConverter, getNewNullableTimeStampConverter, getNewNullableTinyIntConverter, getNewNullableUInt1Converter, getNewNullableUInt2Converter, getNewNullableUInt4Converter, getNewNullableUInt8Converter, getNewNullableVar16CharConverter, getNewNullableVarBinaryConverter, getNewNullableVarCharConverter, getNewNullableVarDecimalConverter, getNewRepeatedBigIntConverter, getNewRepeatedBitConverter, getNewRepeatedDateConverter, getNewRepeatedDecimal18Converter, getNewRepeatedDecimal28DenseConverter, getNewRepeatedDecimal28SparseConverter, getNewRepeatedDecimal38DenseConverter, getNewRepeatedDecimal38SparseConverter, getNewRepeatedDecimal9Converter, getNewRepeatedDictConverter, getNewRepeatedFloat4Converter, getNewRepeatedFloat8Converter, getNewRepeatedIntConverter, getNewRepeatedIntervalConverter, getNewRepeatedIntervalDayConverter, getNewRepeatedIntervalYearConverter, getNewRepeatedSmallIntConverter, getNewRepeatedTimeConverter, getNewRepeatedTimeStampConverter, getNewRepeatedTinyIntConverter, getNewRepeatedUInt1Converter, getNewRepeatedUInt2Converter, getNewRepeatedUInt4Converter, getNewRepeatedUInt8Converter, getNewRepeatedVar16CharConverter, getNewRepeatedVarBinaryConverter, getNewRepeatedVarCharConverter, getNewRepeatedVarDecimalConverter, getNewSmallIntConverter, getNewTimeConverter, getNewTimeStampConverter, getNewTinyIntConverter, getNewUInt1Converter, getNewUInt2Converter, getNewUInt4Converter, getNewUInt8Converter, getNewVar16CharConverter, getNewVarBinaryConverter, getNewVarCharConverter, getNewVarDecimalConverter, postProcessing, supportsField
-
Constructor Details
-
JsonRecordWriter
public JsonRecordWriter(StorageStrategy storageStrategy, org.apache.hadoop.conf.Configuration fsConf)
-
-
Method Details
-
init
Description copied from interface:RecordWriter
Initialize the writer.- Specified by:
init
in interfaceRecordWriter
- Parameters:
writerOptions
- Contains key, value pair of settings.- Throws:
IOException
-
updateSchema
Description copied from interface:RecordWriter
Update the schema in RecordWriter. Called at least once before starting writing the records.- Specified by:
updateSchema
in interfaceRecordWriter
- Throws:
IOException
-
getNewMapConverter
public EventBasedRecordWriter.FieldConverter getNewMapConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewMapConverter
in interfaceRecordWriter
- Overrides:
getNewMapConverter
in classAbstractRecordWriter
-
getNewUnionConverter
public EventBasedRecordWriter.FieldConverter getNewUnionConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewUnionConverter
in interfaceRecordWriter
- Overrides:
getNewUnionConverter
in classAbstractRecordWriter
-
getNewRepeatedMapConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedMapConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedMapConverter
in interfaceRecordWriter
- Overrides:
getNewRepeatedMapConverter
in classAbstractRecordWriter
-
getNewRepeatedListConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedListConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedListConverter
in interfaceRecordWriter
- Overrides:
getNewRepeatedListConverter
in classAbstractRecordWriter
-
startRecord
Description copied from interface:RecordWriter
Called before starting writing fields in a record.- Specified by:
startRecord
in interfaceRecordWriter
- Throws:
IOException
-
endRecord
Description copied from interface:RecordWriter
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods.- Specified by:
endRecord
in interfaceRecordWriter
- Throws:
IOException
-
abort
- Specified by:
abort
in interfaceRecordWriter
- Throws:
IOException
-
cleanup
- Specified by:
cleanup
in interfaceRecordWriter
- Throws:
IOException
-