class TSFHiveRecordReader implements RecordReader<NullWritable, MapWritable>, IReaderSet {

  @Override
  public boolean next(NullWritable key, MapWritable value) throws IOException {
    while (currentIndex < dataSetList.size()) {
      if (!dataSetList.get(currentIndex).hasNext()) {
        currentIndex++;
      }
      else {
        RowRecord rowRecord = dataSetList.get(currentIndex).next();
        List<Field> fields = rowRecord.getFields();
        long timestamp = rowRecord.getTimestamp();

        try {
          MapWritable res = new MapWritable();
          getCurrentValue(deviceIdList, currentIndex, timestamp, isReadTime, isReadDeviceId, fields, measurementIds)
                  .forEach((k, v) -> res.put(new Text(k.toString().toLowerCase()), v));
          value.putAll(res);
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
          throw new IOException(e.getMessage());
        }

        return true;
      }
    }
    return false;
  }

  public  TSFHiveRecordReader(InputSplit split, JobConf job);

}