-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark adds four new data types: STRING BLOB TIMESTAMP DATE #434
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对时序数据为非 iotdb 的场景,目前仍不支持 STRING BLOB TIMESTAMP DATE,因此在 precheck 中添加对类别数的特判。
iotdb-1.3/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb130/IoTDB.java
Show resolved
Hide resolved
iotdb-1.3/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb130/IoTDB.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以及 spotless
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/Config.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/ConfigDescriptor.java
Outdated
Show resolved
Hide resolved
if (splits.length > 6 && !dbType.equals("IoTDB") && !dbType.equals("DoubleIoTDB")) { | ||
for (int i = 6; i < splits.length; i++) { | ||
if (splits[i].equals("0")) { | ||
LOGGER.warn("INSERT_DATATYPE_PROPORTION error, please check this parameter."); | ||
return false; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
magic number 6,在Config类定义一个OLD_xxxxx
magic String “IoTDB”,从一些类型枚举类里找找?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typeNumber 已经改成 TYPENUMBER,能够在配置文件中修改。但修改时要保证其与 INSERT_DATATYPE_PROPORTION 的比例数相同。
core/src/main/java/cn/edu/tsinghua/iot/benchmark/mode/GenerateDataMode.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/mode/TestWithDefaultPathMode.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/workload/GenerateDataWorkLoad.java
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/workload/GenerateDataWorkLoad.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/mode/BaseMode.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL~
@@ -529,14 +537,12 @@ void initSensorCodes() { | |||
} | |||
} | |||
|
|||
/** Generate Probabilities according to proportion(e.g. 1:1:1:1:1:1) */ | |||
/** Generate Probabilities according to proportion(e.g. 1:1:1:1:1:1:1:1:1:1) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep consistent with default value in config here. 1:1:1:1:1:1:0:0:0:0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
@@ -47,7 +47,7 @@ | |||
<properties> | |||
<!-- This was the last version to support Java 8 --> | |||
<logback.version>1.3.14</logback.version> | |||
<iotdb.version>1.3.1</iotdb.version> | |||
<iotdb.version>1.3.3-SNAPSHOT</iotdb.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不要改成snapshot版本
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里因为新数据类型是 1.3.3 版本才有的,为了本地方便可以先搞成快照版本,这样本地 mvn install 就能直接用了。
反正这个 PR 暂不合并,我们大家都 review 完打个包给测试组就行。
等后面开源版 1.3.3 发出来了,我们就替换成 1.3.3,然后合并这个 PR
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/Config.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/ConfigDescriptor.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/ConfigDescriptor.java
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/ConfigDescriptor.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/ConfigDescriptor.java
Outdated
Show resolved
Hide resolved
iotdb-1.3/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb130/IoTDB.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~
Thanks for working on this!Awesome work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done~
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/Config.java
Outdated
Show resolved
Hide resolved
core/src/main/java/cn/edu/tsinghua/iot/benchmark/conf/Config.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
core/src/main/java/cn/edu/tsinghua/iot/benchmark/workload/GenerateQueryWorkLoad.java
Outdated
Show resolved
Hide resolved
iotdb-1.3/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb130/IoTDB.java
Outdated
Show resolved
Hide resolved
for (int k = 0; k < config.getSTRING_LENGTH(); k++) { | ||
stringBuffer.append(CHAR_TABLE.charAt(dataRandom.nextInt(CHAR_TABLE.length()))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么不用work load那边的逻辑来着?两边逻辑不同吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
逻辑相同,此处直接复制 initworkload 处生成 String 的逻辑。我没有理解 workload 那边的逻辑是?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
逻辑一样的话应当抽成公共函数哈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里 String 类型暂不考虑参与查询语句得值过滤条件,代码回退了一下。抽成公共函数确实是一个很好得想法,若后续需要考虑 String,我会将这部分逻辑抽成公共函数。
iotdb-1.3/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb130/IoTDBSessionBase.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
iotdb-1.3/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb130/IoTDBSessionBase.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, congratulation for first pr to iot-benchmark~
First, add four new data types "STRING BLOB TIMESTAMP DATE" in SensorType.java, and then write the data random generation function in generateworkLoad.java. Secondly, add the new type conversion in the genTablet method. Finally, set the encoding method of the new data type in the configuration file.