private static Map<String, ArrayList<Object>> loadCSVData(
      Map<String, TSDataType> measureTSTypeInfos, String dataFileName) throws IOException {
    measureTSTypeInfos.put(TIME_STR, TSDataType.INT64);
    try (BufferedReader reader = new BufferedReader(new FileReader(dataFileName))) {
      String headline = reader.readLine();
      if (headline == null) {
        throw new IOException("Given csv data file has not headers");
      }
      // check the csv file format
      String[] fileColumns = headline.split(",");
      Map<String, Integer> columnToIdMap = new HashMap<>();
      for (int col = 0; col < fileColumns.length; col++) {
        String columnName = fileColumns[col];
        if (columnToIdMap.containsKey(columnName)) {
          throw new IOException(
              String.format("csv file contains duplicate columns: %s", columnName));
        }
        columnToIdMap.put(columnName, col);
      }
      Map<String, ArrayList<Object>> ret = new HashMap<>();
      // make sure that all measurements can be found from the data file
      for (Entry<String, TSDataType> entry : measureTSTypeInfos.entrySet()) {
        String measurement = entry.getKey();
        if (!columnToIdMap.containsKey(entry.getKey())) {
          throw new IOException(String.format("measurement %s's is not in csv file.", measurement));
        } else {
          ret.put(measurement, new ArrayList<>());
        }
      }

      String line;
      while ((line = reader.readLine()) != null) {
        String[] items = line.split(",");
        for (Entry<String, TSDataType> entry : measureTSTypeInfos.entrySet()) {
          String measurement = entry.getKey();
          TSDataType dataType = entry.getValue();
          int idx = columnToIdMap.get(measurement);
          switch (dataType) {
            case BOOLEAN:
              ret.get(measurement).add(Boolean.parseBoolean(items[idx]));
              break;
            case DATE:
            case INT32:
              ret.get(measurement).add(Integer.parseInt(items[idx]));
              break;
            case TIMESTAMP:
            case INT64:
              ret.get(measurement).add(Long.parseLong(items[idx]));
              break;
            case FLOAT:
              ret.get(measurement).add(Float.parseFloat(items[idx]));
              break;
            case DOUBLE:
              ret.get(measurement).add(Double.parseDouble(items[idx]));
              break;
            case STRING:
            case BLOB:
            case TEXT:
              ret.get(measurement).add(BytesUtils.valueOf(items[idx]));
              break;
            case VECTOR:
              throw new IOException(String.format("data type %s is not yet.", TSDataType.VECTOR));
            default:
              throw new IOException("no type");
          }
        }
      }
      return ret;
    } finally {
      measureTSTypeInfos.remove(TIME_STR);
    }
  }
load csv data.

@param measureTSTypeInfos key: measurement name, value: measurement data type
@param dataFileName the csv file name to load
@return key: measurement name, value: series in format of {@link ArrayList}
@throws IOException if the csv format is incorrect
example/session/src/main/java/org/apache/iotdb/TabletExample.java