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.VeniceWriterMessage
-
Field Summary
FieldsFields inherited from class com.linkedin.venice.hadoop.mapreduce.datawriter.reduce.VeniceReducer
MAP_REDUCE_JOB_ID_PROP
Fields inherited from class com.linkedin.venice.hadoop.task.datawriter.AbstractDataWriterTask
TASK_ID_NOT_SET
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected byte[]
compress
(byte[] valueBytesFromSourceVersion) protected void
configureTask
(VeniceProperties props) Allow implementations of this class to configure task-specific stuff.extract
(byte[] key, Iterator<byte[]> valueIterator, DataWriterTaskTracker dataWriterTaskTracker) initDuplicateKeyPrinter
(VeniceProperties properties) No need to print out duplicate keys since duplicate keys are expected in Kafka topics.protected void
setChunkingEnabled
(boolean isChunkingEnabled) protected void
setDestVersionCompressor
(VeniceCompressor compressor) protected void
setSourceVersionCompressor
(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, setVeniceWriterFactory
Methods inherited from class com.linkedin.venice.hadoop.task.datawriter.AbstractPartitionWriter
getDerivedValueSchemaId, isEnableWriteCompute, logMessageProgress, processValuesForKey, recordMessageErrored
Methods 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:AbstractDataWriterTask
Allow implementations of this class to configure task-specific stuff.- Overrides:
configureTask
in 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:
initDuplicateKeyPrinter
in classAbstractPartitionWriter
-
extract
protected AbstractPartitionWriter.VeniceWriterMessage extract(byte[] key, Iterator<byte[]> valueIterator, DataWriterTaskTracker dataWriterTaskTracker) - Overrides:
extract
in classAbstractPartitionWriter
-
setChunkingEnabled
protected void setChunkingEnabled(boolean isChunkingEnabled) - Overrides:
setChunkingEnabled
in classAbstractDataWriterTask
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAbstractPartitionWriter
- Throws:
IOException
-