public class TSFRecordReader extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.MapWritable> implements IReaderSet
| 构造器和说明 |
|---|
TSFRecordReader() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
org.apache.hadoop.io.NullWritable |
getCurrentKey() |
org.apache.hadoop.io.MapWritable |
getCurrentValue() |
static org.apache.hadoop.io.MapWritable |
getCurrentValue(List<String> deviceIdList,
int currentIndex,
long timestamp,
boolean isReadTime,
boolean isReadDeviceId,
List<Field> fields,
List<String> measurementIds) |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
static void |
initialize(TSFInputSplit split,
org.apache.hadoop.conf.Configuration configuration,
IReaderSet readerSet,
List<QueryDataSet> dataSetList,
List<String> deviceIdList) |
boolean |
nextKeyValue() |
static void |
readFieldsValue(org.apache.hadoop.io.MapWritable mapWritable,
List<Field> fields,
List<String> measurementIds)
Read from current fields value
|
void |
setMeasurementIds(List<String> measurementIds) |
void |
setReadDeviceId(boolean isReadDeviceId) |
void |
setReader(TsFileSequenceReader reader) |
void |
setReadTime(boolean isReadTime) |
public void initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
initialize 在类中 org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.MapWritable>IOExceptionpublic static void initialize(TSFInputSplit split, org.apache.hadoop.conf.Configuration configuration, IReaderSet readerSet, List<QueryDataSet> dataSetList, List<String> deviceIdList) throws IOException
IOExceptionpublic boolean nextKeyValue()
throws IOException
nextKeyValue 在类中 org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.MapWritable>IOExceptionpublic org.apache.hadoop.io.NullWritable getCurrentKey()
getCurrentKey 在类中 org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.MapWritable>public org.apache.hadoop.io.MapWritable getCurrentValue()
throws InterruptedException
getCurrentValue 在类中 org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.MapWritable>InterruptedExceptionpublic static org.apache.hadoop.io.MapWritable getCurrentValue(List<String> deviceIdList, int currentIndex, long timestamp, boolean isReadTime, boolean isReadDeviceId, List<Field> fields, List<String> measurementIds) throws InterruptedException
public static void readFieldsValue(org.apache.hadoop.io.MapWritable mapWritable,
List<Field> fields,
List<String> measurementIds)
throws InterruptedException
mapWritable - where to writeInterruptedExceptionpublic float getProgress()
getProgress 在类中 org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.MapWritable>public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.MapWritable>IOExceptionpublic void setReader(TsFileSequenceReader reader)
setReader 在接口中 IReaderSetpublic void setMeasurementIds(List<String> measurementIds)
setMeasurementIds 在接口中 IReaderSetpublic void setReadDeviceId(boolean isReadDeviceId)
setReadDeviceId 在接口中 IReaderSetpublic void setReadTime(boolean isReadTime)
setReadTime 在接口中 IReaderSetCopyright © 2022 The Apache Software Foundation. All rights reserved.