Class SplunkBatchWriter
java.lang.Object
org.apache.drill.exec.store.AbstractRecordWriter
org.apache.drill.exec.store.splunk.SplunkBatchWriter
- All Implemented Interfaces:
RecordWriter
- Direct Known Subclasses:
SplunkBatchInsertWriter
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
class
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.splunk.Index
protected final com.splunk.Service
-
Constructor Summary
ConstructorDescriptionSplunkBatchWriter
(UserBitShared.UserCredentials userCredentials, List<String> tableIdentifier, SplunkWriter config) -
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.getNewBigIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewBitConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewDateConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewDictConverter
(int fieldId, String fieldName, FieldReader reader) getNewFloat4Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewFloat8Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewMapConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableBigIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableBitConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableDateConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableFloat4Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableFloat8Converter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableSmallIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableTimeConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableTimeStampConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableTinyIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableVarCharConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewNullableVarDecimalConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewRepeatedDictConverter
(int fieldId, String fieldName, FieldReader reader) getNewRepeatedListConverter
(int fieldId, String fieldName, FieldReader reader) getNewRepeatedMapConverter
(int fieldId, String fieldName, FieldReader reader) getNewSmallIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewTimeConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewTimeStampConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewTinyIntConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewUnionConverter
(int fieldId, String fieldName, FieldReader reader) getNewVarCharConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.getNewVarDecimalConverter
(int fieldId, String fieldName, FieldReader reader) Add the field value given invalueHolder
at the given column numberfieldId
.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.AbstractRecordWriter
checkForNewPartition, getNewDecimal18Converter, getNewDecimal28DenseConverter, getNewDecimal28SparseConverter, getNewDecimal38DenseConverter, getNewDecimal38SparseConverter, getNewDecimal9Converter, getNewIntervalConverter, getNewIntervalDayConverter, getNewIntervalYearConverter, getNewNullableDecimal18Converter, getNewNullableDecimal28DenseConverter, getNewNullableDecimal28SparseConverter, getNewNullableDecimal38DenseConverter, getNewNullableDecimal38SparseConverter, getNewNullableDecimal9Converter, getNewNullableIntervalConverter, getNewNullableIntervalDayConverter, getNewNullableIntervalYearConverter, getNewNullableUInt1Converter, getNewNullableUInt2Converter, getNewNullableUInt4Converter, getNewNullableUInt8Converter, getNewNullableVar16CharConverter, getNewNullableVarBinaryConverter, 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, getNewUInt1Converter, getNewUInt2Converter, getNewUInt4Converter, getNewUInt8Converter, getNewVar16CharConverter, getNewVarBinaryConverter, newPartition, postProcessing, setPartitionVector, supportsField
-
Field Details
-
splunkService
protected final com.splunk.Service splunkService -
destinationIndex
protected com.splunk.Index destinationIndex
-
-
Constructor Details
-
Method Details
-
init
Description copied from interface:RecordWriter
Initialize the writer.- Parameters:
writerOptions
- Contains key, value pair of settings.
-
updateSchema
Update the schema in RecordWriter. Called before starting writing the records. In this case, we add the index to Splunk here. Splunk's API is a little sparse and doesn't really do much in the way of error checking or providing feedback if the operation fails.- Parameters:
batch
-VectorAccessible
The incoming batch
-
startRecord
public void startRecord()Description copied from interface:RecordWriter
Called before starting writing fields in a record. -
endRecord
public void endRecord()Description copied from interface:RecordWriter
Called after adding all fields in a particular record are added using add{TypeHolder}(fieldId, TypeHolder) methods. -
abort
public void abort() -
cleanup
public void cleanup() -
getNewNullableIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableIntConverter
in classAbstractRecordWriter
-
getNewIntConverter
public EventBasedRecordWriter.FieldConverter getNewIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewIntConverter
in interfaceRecordWriter
- Overrides:
getNewIntConverter
in classAbstractRecordWriter
-
getNewNullableBigIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableBigIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableBigIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableBigIntConverter
in classAbstractRecordWriter
-
getNewBigIntConverter
public EventBasedRecordWriter.FieldConverter getNewBigIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewBigIntConverter
in interfaceRecordWriter
- Overrides:
getNewBigIntConverter
in classAbstractRecordWriter
-
getNewNullableSmallIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableSmallIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableSmallIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableSmallIntConverter
in classAbstractRecordWriter
-
getNewSmallIntConverter
public EventBasedRecordWriter.FieldConverter getNewSmallIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewSmallIntConverter
in interfaceRecordWriter
- Overrides:
getNewSmallIntConverter
in classAbstractRecordWriter
-
getNewNullableTinyIntConverter
public EventBasedRecordWriter.FieldConverter getNewNullableTinyIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableTinyIntConverter
in interfaceRecordWriter
- Overrides:
getNewNullableTinyIntConverter
in classAbstractRecordWriter
-
getNewTinyIntConverter
public EventBasedRecordWriter.FieldConverter getNewTinyIntConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewTinyIntConverter
in interfaceRecordWriter
- Overrides:
getNewTinyIntConverter
in classAbstractRecordWriter
-
getNewNullableFloat4Converter
public EventBasedRecordWriter.FieldConverter getNewNullableFloat4Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableFloat4Converter
in interfaceRecordWriter
- Overrides:
getNewNullableFloat4Converter
in classAbstractRecordWriter
-
getNewFloat4Converter
public EventBasedRecordWriter.FieldConverter getNewFloat4Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewFloat4Converter
in interfaceRecordWriter
- Overrides:
getNewFloat4Converter
in classAbstractRecordWriter
-
getNewNullableFloat8Converter
public EventBasedRecordWriter.FieldConverter getNewNullableFloat8Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableFloat8Converter
in interfaceRecordWriter
- Overrides:
getNewNullableFloat8Converter
in classAbstractRecordWriter
-
getNewFloat8Converter
public EventBasedRecordWriter.FieldConverter getNewFloat8Converter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewFloat8Converter
in interfaceRecordWriter
- Overrides:
getNewFloat8Converter
in classAbstractRecordWriter
-
getNewNullableVarDecimalConverter
public EventBasedRecordWriter.FieldConverter getNewNullableVarDecimalConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableVarDecimalConverter
in interfaceRecordWriter
- Overrides:
getNewNullableVarDecimalConverter
in classAbstractRecordWriter
-
getNewVarDecimalConverter
public EventBasedRecordWriter.FieldConverter getNewVarDecimalConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewVarDecimalConverter
in interfaceRecordWriter
- Overrides:
getNewVarDecimalConverter
in classAbstractRecordWriter
-
getNewNullableDateConverter
public EventBasedRecordWriter.FieldConverter getNewNullableDateConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableDateConverter
in interfaceRecordWriter
- Overrides:
getNewNullableDateConverter
in classAbstractRecordWriter
-
getNewDateConverter
public EventBasedRecordWriter.FieldConverter getNewDateConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewDateConverter
in interfaceRecordWriter
- Overrides:
getNewDateConverter
in classAbstractRecordWriter
-
getNewNullableTimeConverter
public EventBasedRecordWriter.FieldConverter getNewNullableTimeConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableTimeConverter
in interfaceRecordWriter
- Overrides:
getNewNullableTimeConverter
in classAbstractRecordWriter
-
getNewTimeConverter
public EventBasedRecordWriter.FieldConverter getNewTimeConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewTimeConverter
in interfaceRecordWriter
- Overrides:
getNewTimeConverter
in classAbstractRecordWriter
-
getNewNullableVarCharConverter
public EventBasedRecordWriter.FieldConverter getNewNullableVarCharConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableVarCharConverter
in interfaceRecordWriter
- Overrides:
getNewNullableVarCharConverter
in classAbstractRecordWriter
-
getNewNullableTimeStampConverter
public EventBasedRecordWriter.FieldConverter getNewNullableTimeStampConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableTimeStampConverter
in interfaceRecordWriter
- Overrides:
getNewNullableTimeStampConverter
in classAbstractRecordWriter
-
getNewTimeStampConverter
public EventBasedRecordWriter.FieldConverter getNewTimeStampConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewTimeStampConverter
in interfaceRecordWriter
- Overrides:
getNewTimeStampConverter
in classAbstractRecordWriter
-
getNewVarCharConverter
public EventBasedRecordWriter.FieldConverter getNewVarCharConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewVarCharConverter
in interfaceRecordWriter
- Overrides:
getNewVarCharConverter
in classAbstractRecordWriter
-
getNewNullableBitConverter
public EventBasedRecordWriter.FieldConverter getNewNullableBitConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewNullableBitConverter
in interfaceRecordWriter
- Overrides:
getNewNullableBitConverter
in classAbstractRecordWriter
-
getNewBitConverter
public EventBasedRecordWriter.FieldConverter getNewBitConverter(int fieldId, String fieldName, FieldReader reader) Description copied from interface:RecordWriter
Add the field value given invalueHolder
at the given column numberfieldId
.- Specified by:
getNewBitConverter
in interfaceRecordWriter
- Overrides:
getNewBitConverter
in classAbstractRecordWriter
-
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
-
getNewDictConverter
public EventBasedRecordWriter.FieldConverter getNewDictConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewDictConverter
in interfaceRecordWriter
- Overrides:
getNewDictConverter
in classAbstractRecordWriter
-
getNewRepeatedDictConverter
public EventBasedRecordWriter.FieldConverter getNewRepeatedDictConverter(int fieldId, String fieldName, FieldReader reader) - Specified by:
getNewRepeatedDictConverter
in interfaceRecordWriter
- Overrides:
getNewRepeatedDictConverter
in classAbstractRecordWriter
-