public class BulkDataGeneratorRecordReader extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
Modifier and Type | Field and Description |
---|---|
private int |
createdRecords |
private org.apache.hadoop.io.Text |
key |
private int |
numRecordsToCreate |
static String |
RECORDS_PER_MAPPER_TASK_KEY |
private org.apache.hadoop.io.NullWritable |
value |
Constructor and Description |
---|
BulkDataGeneratorRecordReader() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.io.Text |
getCurrentKey() |
org.apache.hadoop.io.NullWritable |
getCurrentValue() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
boolean |
nextKeyValue() |
private int numRecordsToCreate
private int createdRecords
private org.apache.hadoop.io.Text key
private org.apache.hadoop.io.NullWritable value
public static final String RECORDS_PER_MAPPER_TASK_KEY
public BulkDataGeneratorRecordReader()
public void initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
initialize
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
IOException
InterruptedException
public boolean nextKeyValue()
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
public org.apache.hadoop.io.Text getCurrentKey()
getCurrentKey
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
public org.apache.hadoop.io.NullWritable getCurrentValue()
getCurrentValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
public float getProgress() throws IOException, InterruptedException
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
IOException
InterruptedException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.