diff --git a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/workload/GenerateQueryWorkLoad.java b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/workload/GenerateQueryWorkLoad.java index e6cff344d..6c5c58dfb 100644 --- a/core/src/main/java/cn/edu/tsinghua/iot/benchmark/workload/GenerateQueryWorkLoad.java +++ b/core/src/main/java/cn/edu/tsinghua/iot/benchmark/workload/GenerateQueryWorkLoad.java @@ -218,7 +218,8 @@ private List getQueryDeviceSchemaList(boolean typeAllow) throws Wo while (queryDevices.size() < Math.min(deviceQueryMaxCount, config.getQUERY_DEVICE_NUM()) && queryDeviceIds.size() < deviceQueryMaxCount) { // get a device belong to [first_device_index, first_device_index + device_number) - deviceId = devices.get(queryDeviceRandom.nextInt(devices.size())) + config.getFIRST_DEVICE_INDEX(); + deviceId = + devices.get(queryDeviceRandom.nextInt(devices.size())) + config.getFIRST_DEVICE_INDEX(); // avoid duplicate if (!queryDeviceIds.contains(deviceId)) { queryDeviceIds.add(deviceId);