From ff3bb1a66a4de1226cc1cef8c98dc92f3342d98c Mon Sep 17 00:00:00 2001 From: liyuheng Date: Thu, 7 Sep 2023 16:07:04 +0800 Subject: [PATCH] modify int to long --- .../cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDB.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDB.java b/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDB.java index ad65e104f..e4cae6f0e 100644 --- a/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDB.java +++ b/iotdb-1.1/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb110/IoTDB.java @@ -78,6 +78,7 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; /** this class will create more than one connection. */ @@ -691,7 +692,7 @@ protected Status executeQueryAndGetStatus(String sql, Operation operation) { LOGGER.info("{} query SQL: {}", Thread.currentThread().getName(), executeSQL); } AtomicInteger line = new AtomicInteger(); - AtomicInteger queryResultPointNum = new AtomicInteger(); + AtomicLong queryResultPointNum = new AtomicLong(); AtomicBoolean isOk = new AtomicBoolean(true); try (Statement statement = ioTDBConnection.getConnection().createStatement()) { List> records = new ArrayList<>(); @@ -724,8 +725,10 @@ protected Status executeQueryAndGetStatus(String sql, Operation operation) { LOGGER.error("exception occurred when execute query={}", executeSQL, e); isOk.set(false); } - queryResultPointNum.set( - line.get() * config.getQUERY_SENSOR_NUM() * config.getQUERY_DEVICE_NUM()); + long resultPointNum = line.get(); + resultPointNum *= config.getQUERY_SENSOR_NUM(); + resultPointNum *= config.getQUERY_DEVICE_NUM(); + queryResultPointNum.set(resultPointNum); }); try { future.get(config.getREAD_OPERATION_TIMEOUT_MS(), TimeUnit.MILLISECONDS);