Class KafkaInputSplit
java.lang.Object
com.linkedin.venice.hadoop.input.kafka.KafkaInputSplit
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
,org.apache.hadoop.mapred.InputSplit
We borrowed some idea from the open-sourced attic-crunch lib:
https://github.com/apache/attic-crunch/blob/master/crunch-kafka/src/main/java/org/apache/crunch/kafka/record/KafkaInputSplit.java
InputSplit that represent retrieving data from a single
PubSubTopicPartition
between the specified start
and end offsets.-
Constructor Summary
ConstructorsConstructorDescriptionNullary constructor for Hadoop to instantiate reflectively.KafkaInputSplit
(PubSubPartitionSplit pubSubPartitionSplit) Original constructor signature, now wiring through to PubSubPartitionSplit. -
Method Summary
Modifier and TypeMethodDescriptionlong
String[]
long
void
readFields
(DataInput in) toString()
void
write
(DataOutput out)
-
Constructor Details
-
KafkaInputSplit
public KafkaInputSplit()Nullary constructor for Hadoop to instantiate reflectively. -
KafkaInputSplit
Original constructor signature, now wiring through to PubSubPartitionSplit.
-
-
Method Details
-
getTopicPartition
-
getStartingOffset
-
getEndingOffset
-
getNumberOfRecords
public long getNumberOfRecords() -
getLength
public long getLength()- Specified by:
getLength
in interfaceorg.apache.hadoop.mapred.InputSplit
-
getLocations
- Specified by:
getLocations
in interfaceorg.apache.hadoop.mapred.InputSplit
-
write
- Specified by:
write
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
readFields
- Specified by:
readFields
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
toString
-