Class VeniceKafkaInputReducer
java.lang.Object
com.linkedin.venice.hadoop.task.datawriter.AbstractDataWriterTask
com.linkedin.venice.hadoop.task.datawriter.AbstractPartitionWriter
com.linkedin.venice.hadoop.mapreduce.datawriter.reduce.VeniceReducer
com.linkedin.venice.hadoop.input.kafka.VeniceKafkaInputReducer
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.io.Closeable,org.apache.hadoop.mapred.JobConfigurable,org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.BytesWritable, org.apache.hadoop.io.BytesWritable>
This class is designed specifically for
KafkaInputFormat, and right now, it will pick up the latest
entry according to the associated offset, and produce it to Kafka.-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.venice.hadoop.task.datawriter.AbstractPartitionWriter
AbstractPartitionWriter.ChildWriterProducerCallback, AbstractPartitionWriter.DuplicateKeyPrinter, AbstractPartitionWriter.PartitionWriterProducerCallback, AbstractPartitionWriter.VeniceRecordWithMetadata, AbstractPartitionWriter.VeniceWriterMessage -
Field Summary
FieldsFields inherited from class com.linkedin.venice.hadoop.mapreduce.datawriter.reduce.VeniceReducer
MAP_REDUCE_JOB_ID_PROPFields inherited from class com.linkedin.venice.hadoop.task.datawriter.AbstractDataWriterTask
TASK_ID_NOT_SET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected byte[]compress(byte[] valueBytesFromSourceVersion) protected voidconfigureTask(VeniceProperties props) Allow implementations of this class to configure task-specific stuff.extract(byte[] key, Iterator<AbstractPartitionWriter.VeniceRecordWithMetadata> values, DataWriterTaskTracker dataWriterTaskTracker) initDuplicateKeyPrinter(VeniceProperties properties) No need to print out duplicate keys since duplicate keys are expected in Kafka topics.protected voidsetChunkingEnabled(boolean isChunkingEnabled) protected voidsetDestVersionCompressor(VeniceCompressor compressor) protected voidsetSourceVersionCompressor(VeniceCompressor compressor) Methods inherited from class com.linkedin.venice.hadoop.mapreduce.datawriter.reduce.VeniceReducer
configure, createBasicVeniceWriter, getCallback, getDataWriterTaskTracker, getExceedQuotaFlag, getJobConf, getTotalIncomingDataSizeInBytes, hasReportedFailure, reduce, setExceedQuota, setHadoopJobClientProvider, setVeniceWriter, setVeniceWriterFactoryMethods inherited from class com.linkedin.venice.hadoop.task.datawriter.AbstractPartitionWriter
getDerivedValueSchemaId, getRmdSchema, getVeniceWriterFactory, isEnableWriteCompute, logMessageProgress, processValuesForKey, recordMessageErroredMethods inherited from class com.linkedin.venice.hadoop.task.datawriter.AbstractDataWriterTask
configure, getEngineTaskConfigProvider, getPartitionCount, getTaskId, isChunkingEnabled, isRmdChunkingEnabled
-
Field Details
-
veniceFilterChain
-
-
Constructor Details
-
VeniceKafkaInputReducer
public VeniceKafkaInputReducer()
-
-
Method Details
-
configureTask
Description copied from class:AbstractDataWriterTaskAllow implementations of this class to configure task-specific stuff.- Overrides:
configureTaskin classVeniceReducer- Parameters:
props- the job props that the task was configured with.
-
setSourceVersionCompressor
-
setDestVersionCompressor
-
compress
protected byte[] compress(byte[] valueBytesFromSourceVersion) -
initDuplicateKeyPrinter
protected AbstractPartitionWriter.DuplicateKeyPrinter initDuplicateKeyPrinter(VeniceProperties properties) No need to print out duplicate keys since duplicate keys are expected in Kafka topics.- Overrides:
initDuplicateKeyPrinterin classAbstractPartitionWriter
-
extract
protected AbstractPartitionWriter.VeniceWriterMessage extract(byte[] key, Iterator<AbstractPartitionWriter.VeniceRecordWithMetadata> values, DataWriterTaskTracker dataWriterTaskTracker) - Overrides:
extractin classAbstractPartitionWriter
-
setChunkingEnabled
protected void setChunkingEnabled(boolean isChunkingEnabled) - Overrides:
setChunkingEnabledin classAbstractDataWriterTask
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractPartitionWriter- Throws:
IOException
-