diff --git a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/Batch.java b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/Batch.java index b4ae21ebf..53b8aa37b 100644 --- a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/Batch.java +++ b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/Batch.java @@ -54,7 +54,7 @@ public long pointNum() { // Count the number of measurements List sensors = deviceSchema.getSensors(); for (Sensor sensor : sensors) { - if (sensor.getColumnCategory() == ColumnCategory.MEASUREMENT) { + if (sensor.getColumnCategory() == ColumnCategory.FIELD) { measureNum++; } } diff --git a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/MultiDeviceBatch.java b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/MultiDeviceBatch.java index 61d677e64..78984ebdc 100644 --- a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/MultiDeviceBatch.java +++ b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Batch/MultiDeviceBatch.java @@ -85,7 +85,7 @@ public long pointNum() { long measureNum = 0; List sensors = deviceSchemas.get(0).getSensors(); for (Sensor sensor : sensors) { - if (sensor.getColumnCategory() == ColumnCategory.MEASUREMENT) { + if (sensor.getColumnCategory() == ColumnCategory.FIELD) { measureNum++; } } diff --git a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Sensor.java b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Sensor.java index d777fbea2..7b8d194fa 100644 --- a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Sensor.java +++ b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/Sensor.java @@ -39,7 +39,7 @@ public Sensor() {} public Sensor(String name, SensorType sensorType) { this.name = name; this.sensorType = sensorType; - this.columnCategory = ColumnCategory.MEASUREMENT; + this.columnCategory = ColumnCategory.FIELD; } public Sensor(String name, SensorType sensorType, ColumnCategory columnCategory) { diff --git a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/enums/ColumnCategory.java b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/enums/ColumnCategory.java index 02c178bd0..3441e03c4 100644 --- a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/enums/ColumnCategory.java +++ b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/entity/enums/ColumnCategory.java @@ -20,9 +20,9 @@ package cn.edu.tsinghua.iot.benchmark.entity.enums; public enum ColumnCategory { - ID("ID"), + TAG("TAG"), ATTRIBUTE("ATTRIBUTE"), - MEASUREMENT("MEASUREMENT"); + FIELD("FIELD"); public String name; @@ -37,6 +37,6 @@ public static ColumnCategory getType(int ordinal) { } } // default type - return ColumnCategory.MEASUREMENT; + return ColumnCategory.FIELD; } } diff --git a/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java b/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java index 56ca413ef..c8d7356db 100644 --- a/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java +++ b/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java @@ -27,6 +27,7 @@ import cn.edu.tsinghua.iot.benchmark.entity.Batch.IBatch; import cn.edu.tsinghua.iot.benchmark.entity.Record; import cn.edu.tsinghua.iot.benchmark.entity.Sensor; +import cn.edu.tsinghua.iot.benchmark.entity.enums.ColumnCategory; import cn.edu.tsinghua.iot.benchmark.entity.enums.SensorType; import cn.edu.tsinghua.iot.benchmark.iotdb200.DMLStrategy.SessionManager; import cn.edu.tsinghua.iot.benchmark.iotdb200.IoTDB; @@ -118,7 +119,7 @@ private void registerTable(SessionManager metaSession, List ti .append(" ") .append(SensorType.STRING) .append(" ") - .append(Tablet.ColumnCategory.ID); + .append(ColumnCategory.TAG); for (String key : deviceSchema.getTags().keySet()) { builder .append(", ") @@ -126,7 +127,7 @@ private void registerTable(SessionManager metaSession, List ti .append(" ") .append(SensorType.STRING) .append(" ") - .append(Tablet.ColumnCategory.ID); + .append(ColumnCategory.TAG); } builder.append(")"); tables