GithubHelp home page GithubHelp logo

thulab / iot-benchmark Goto Github PK

View Code? Open in Web Editor NEW
178.0 178.0 101.0 11.91 MB

IoT-benchmark is a tool for benchmarking TSDB in IoT scenario.

License: Apache License 2.0

Java 99.22% Shell 0.52% Batchfile 0.26%

iot-benchmark's People

Contributors

buaaserein avatar cpaulyz avatar crzbulabula avatar dependabot[bot] avatar ejttianyu avatar flow4215 avatar genius-pig avatar jackietien97 avatar jixuan1989 avatar jt2594838 avatar jun0315 avatar l2280212 avatar little-emotion avatar littlehealth avatar liukun4515 avatar liuruiyiyang avatar liuzhen1207 avatar liyuheng55555 avatar myxof avatar ningzefei avatar nlosilva1 avatar noneedname avatar onesizefitsquorum avatar qiaojialin avatar spricoder avatar vgalaxies avatar wlh0 avatar xiaoyekanren avatar xuanronaldo avatar ycycse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iot-benchmark's Issues

Some error with test

I just want to Data Ingestion Test,
the iotdb is 0.11.1
it have some error:

root at root in /home/project/iotdb-benchmark-master/iotdb-0.11/target/iotdb-0.11-0.0.1
$ ./benchmark.sh
/home/project/iotdb-benchmark-master/iotdb-0.11/target/iotdb-0.11-0.0.1
2021-02-01 11:05:32,771 INFO cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper:312 - Registering schema...
2021-02-01 11:05:34,135 INFO cn.edu.tsinghua.iotdb.benchmark.App:132 - Generating workload buffer...
2021-02-01 11:05:35,983 WARN org.apache.iotdb.tsfile.common.conf.TSFileDescriptor:90 - Failed to find config file iotdb-engine.properties at classpath, use default configuration
2021-02-01 11:05:36,952 INFO cn.edu.tsinghua.iotdb.benchmark.client.BaseClient:54 - pool-1-thread-17 0.10% syntheticWorkload is done.
2021-02-01 11:05:36,953 INFO cn.edu.tsinghua.iotdb.benchmark.client.BaseClient:54 - pool-1-thread-10 0.10% syntheticWorkload is done.
failed!
failed!
failed!
failed!
failed!
failed!
failed!
failed!
failed!
2021-02-01 11:05:46,353 ERROR cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper:74 - Insert batch failed because
org.apache.iotdb.rpc.BatchExecutionException: null
at org.apache.iotdb.rpc.RpcUtils.verifySuccess(RpcUtils.java:59)
at org.apache.iotdb.rpc.RpcUtils.verifySuccess(RpcUtils.java:48)
at org.apache.iotdb.session.Session.insertTablet(Session.java:243)
at org.apache.iotdb.session.Session.insertTablet(Session.java:230)
at cn.edu.tsinghua.iotdb.benchmark.iotdb011.IoTDBSession.insertOneBatch(IoTDBSession.java:115)
at cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper.insertOneBatch(DBWrapper.java:55)
at cn.edu.tsinghua.iotdb.benchmark.client.BaseClient.doTest(BaseClient.java:73)
at cn.edu.tsinghua.iotdb.benchmark.client.Client.run(Client.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

The allocated storage groups are uneven

Hi:
when we used benchmark to create timeseries like this:
SG=30;Device=300;Sensor=3200
We want to manage 10 devices per storage group.But benchmark didn't create them like that.
group_0:Total timeseries number = 28800
group_1:Total timeseries number = 28800
group_2:Total timeseries number = 25600
group_3:Total timeseries number = 25600
group_4:Total timeseries number = 22400
group_5:Total timeseries number = 19200
group_6:Total timeseries number = 16000
group_7:Total timeseries number = 12800
.....

mlog.txt is bigger the 10MB.So I can not upload it in this webpage.

当设置300个设备,每个设备3200个变量的场景写入30个存储组时,设备并未平均分配到30个存储组。预期是每个存储组管理10个设备。但是现在并非如此,例如group_0内有9个设备;group_5内有6个设备。。。。

mvn problem

With the master branch, mvn clean package -Dmaven.test.skip=true fails:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for iotdb-benchmark 0.0.1:
[INFO]
[INFO] iotdb-benchmark .................................... SUCCESS [  0.142 s]
[INFO] Benchmark Core ..................................... FAILURE [ 37.602 s]
[INFO] Benchmark IoTDB 0.12 ............................... SKIPPED
[INFO] Benchmark IoTDB 0.11 ............................... SKIPPED
[INFO] Benchmark IoTDB 0.10 ............................... SKIPPED
[INFO] Benchmark IoTDB 0.09 ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  37.859 s
[INFO] Finished at: 2022-01-24T15:26:29+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project core: Could not resolve dependencies for project cn.edu.tsinghua:core:jar:0.0.1: Failed to collect dependencies at org.glassfish.jaxb:jaxb-runtime:jar:2.3.0-b170127.1453 -> org.glassfish.jaxb:jaxb-core:jar:2.3.0-b170127.1453 -> javax.xml.bind:jaxb-api:jar:2.3.0-b161121.1438: Failed to read artifact descriptor for javax.xml.bind:jaxb-api:jar:2.3.0-b161121.1438: Could not transfer artifact javax.xml.bind:jaxb-api:pom:2.3.0-b161121.1438 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [releases.java.net (http://maven.java.net/content/repositories/releases/, default, releases+snapshots), shapshots.java.net (http://maven.java.net/content/repositories/snapshots/, default, releases+snapshots), jvnet-nexus-staging (http://maven.java.net/content/repositories/staging/, default, releases+snapshots), netbeans (http://bits.netbeans.org/nexus/content/groups/netbeans, default, releases)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :core

Dependency org.apache.httpcomponents:httpclient, leading to CVE problem

Hi, In kairosdb/,there is a dependency **org.apache.httpcomponents:httpclient:4.3.3
** that calls the risk method.

CVE-2020-13956

The scope of this CVE affected version is [,4.5.13)

After further analysis, in this project, the main Api called is org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost

Risk method repair link : GitHub

CVE Bug Invocation Path--

Path Length : 8

cn.edu.tsinghua.iotdb.benchmark.kairosdb.KairosDB: cleanup() .m2/repository/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar
org.kairosdb.client.HttpClient: deleteMetric(java.lang.String) .m2/repository/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar
org.kairosdb.client.HttpClient: delete(java.lang.String,org.kairosdb.client.response.JsonResponseHandler)Ljava.lang.Object; .m2/repository/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar
org.kairosdb.client.HttpClient: execute(com.proofpoint.http.client.Request,org.kairosdb.client.response.JsonResponseHandler)Ljava.lang.Object; .m2/repository/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar
org.apache.http.impl.client.CloseableHttpClient: execute(org.apache.http.client.methods.HttpUriRequest)Lorg.apache.http.client.methods.CloseableHttpResponse; .m2/repository/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar
org.apache.http.impl.client.CloseableHttpClient: execute(org.apache.http.client.methods.HttpUriRequest,org.apache.http.protocol.HttpContext)Lorg.apache.http.client.methods.CloseableHttpResponse; .m2/repository/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar
org.apache.http.impl.client.CloseableHttpClient: determineTarget(org.apache.http.client.methods.HttpUriRequest)Lorg.apache.http.HttpHost; .m2/repository/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar
org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost;

Dependency tree--

[INFO] cn.edu.tsinghua:kairosdb:jar:0.0.1
[INFO] +- cn.edu.tsinghua:core:jar:0.0.1:compile
[INFO] |  +- commons-cli:commons-cli:jar:1.3.1:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] |  +- org.weakref:jmxutils:jar:1.21:compile
[INFO] |  +- postgresql:postgresql:jar:9.1-901-1.jdbc4:compile
[INFO] |  +- mysql:mysql-connector-java:jar:5.1.44:compile
[INFO] |  +- com.alibaba:fastjson:jar:1.2.31:compile
[INFO] |  +- joda-time:joda-time:jar:2.10.1:compile
[INFO] |  +- net.agkn:hll:jar:1.6.0:compile
[INFO] |  |  \- it.unimi.dsi:fastutil:jar:6.5.11:compile
[INFO] |  +- com.clearspring.analytics:stream:jar:2.9.8:compile
[INFO] |  +- org.apache.kafka:kafka_2.10:jar:0.8.2.0:compile
[INFO] |  |  +- org.apache.kafka:kafka-clients:jar:0.8.2.0:compile
[INFO] |  |  |  +- net.jpountz.lz4:lz4:jar:1.2.0:compile
[INFO] |  |  |  \- org.xerial.snappy:snappy-java:jar:1.1.1.6:compile
[INFO] |  |  +- com.yammer.metrics:metrics-core:jar:2.2.0:compile
[INFO] |  |  +- org.scala-lang:scala-library:jar:2.10.4:compile
[INFO] |  |  +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
[INFO] |  |  |  +- jline:jline:jar:0.9.94:compile
[INFO] |  |  |  \- io.netty:netty:jar:3.7.0.Final:compile
[INFO] |  |  +- net.sf.jopt-simple:jopt-simple:jar:3.2:compile
[INFO] |  |  \- com.101tec:zkclient:jar:0.3:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  +- javax.activation:activation:jar:1.1:compile
[INFO] |  +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] |  |  +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
[INFO] |  |  +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] |  |  +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] |  |  \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] |  \- com.opencsv:opencsv:jar:5.5.2:compile
[INFO] |     +- org.apache.commons:commons-text:jar:1.9:compile
[INFO] |     +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] |     |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |     \- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] +- org.kairosdb:client:jar:3.0.0:compile
[INFO] |  +- com.google.guava:guava:jar:25.1-jre:compile
[INFO] |  |  +- org.checkerframework:checker-qual:jar:2.0.0:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] |  |  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.3.3:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.6:compile
[INFO] |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  +- commons-io:commons-io:jar:2.5:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:2.0.0:compile
[INFO] |  +- com.proofpoint.platform:http-client:jar:1.80:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-io:jar:9.3.24.v20180605:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-util:jar:9.3.24.v20180605:compile
[INFO] |  |  +- com.proofpoint.platform:concurrent:jar:1.80:compile
[INFO] |  |  +- com.proofpoint.platform:json:jar:1.80:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.5:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.9.5:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.5:compile
[INFO] |  |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.5:compile
[INFO] |  |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.5:compile
[INFO] |  |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.9.5:compile
[INFO] |  |  |  \- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.9.5:compile
[INFO] |  |  +- com.proofpoint.platform:log:jar:1.80:compile
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  +- com.proofpoint.platform:units:jar:1.80:compile
[INFO] |  |  +- com.proofpoint.platform:stats:jar:1.80:compile
[INFO] |  |  |  +- com.proofpoint.platform:reporting:jar:1.80:compile
[INFO] |  |  |  \- org.openjdk.jol:jol-core:jar:0.1:compile
[INFO] |  |  +- com.proofpoint.platform:configuration:jar:1.80:compile
[INFO] |  |  |  \- cglib:cglib-nodep:jar:3.1:compile
[INFO] |  |  +- com.proofpoint.platform:trace-token:jar:1.80:compile
[INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  |  +- com.google.inject:guice:jar:4.2.0:compile
[INFO] |  |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  +- com.google.inject.extensions:guice-multibindings:jar:4.2.0:compile
[INFO] |  |  \- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.9.5:compile
[INFO] |  +- org.apache.bval:bval-jsr303:jar:0.5:compile
[INFO] |  |  \- org.apache.bval:bval-core:jar:0.5:compile
[INFO] |  |     \- commons-beanutils:commons-beanutils-core:jar:1.8.3:compile
[INFO] |  \- com.google.code.gson:gson:jar:2.8.0:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.30:compile
[INFO] +- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.30:compile
[INFO] +- junit:junit:jar:4.13.1:compile
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] \- log4j:log4j:jar:1.2.17:compile

Suggested solutions:

Update dependency version

Thank you very much.

[Requirement]generation of storage groups/timeseries/data types as user-specified in conf file

[需求]Benchmark提供按用户指定生成存储组/时间序列/数据类型
[Requirement]generation of storage groups/timeseries/data types as user-specified in conf file

希望Benchmark能够读取用户定义的配置文件,按照用户指定生成相应名称的存储组、时间序列和相应数据类型的数据。
Benchmark can generate data as configuration file.

Execute performance test for iotdb with benchmark , but there is an error from the tool .

Yesterday I tested the performance of iotdb by benchmark , there is an error info from jdbc interface.
The iotdb release is from https://github.com/apache/incubator-iotdb.git
The iotdb-benchmark release is from https://github.com/thulab/iotdb-benchmark.git

main:
[copy] Copying 1 file to /home/liurui/lm_test/benchmark/lib
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.826 s
[INFO] Finished at: 2020-01-21T15:32:18+08:00
[INFO] ------------------------------------------------------------------------
/home/liurui/lm_test/benchmark
2020-01-21 15:32:19,150 ERROR cn.edu.tsinghua.iotdb.benchmark.tsdb.iotdb.IoTDB:54 - Initialize IoTDB failed because
org.apache.iotdb.jdbc.IoTDBSQLException:
at org.apache.iotdb.jdbc.IoTDBConnection.getTimeZone(IoTDBConnection.java:479)
at org.apache.iotdb.jdbc.IoTDBConnection.openSession(IoTDBConnection.java:431)
at org.apache.iotdb.jdbc.IoTDBConnection.(IoTDBConnection.java:84)
at org.apache.iotdb.jdbc.IoTDBDriver.connect(IoTDBDriver.java:63)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at cn.edu.tsinghua.iotdb.benchmark.tsdb.iotdb.IoTDB.init(IoTDB.java:51)
at cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper.init(DBWrapper.java:216)
at cn.edu.tsinghua.iotdb.benchmark.App.testWithDefaultPath(App.java:93)
at cn.edu.tsinghua.iotdb.benchmark.App.main(App.java:60)

the information is too long to write here complete.

Please consider using Connection Pool when interacting with TSDBs

Would you please consider using connection pool (e.g. org.apache.http.impl.conn.PoolingHttpClientConnectionManager) when sending requests to TSDBs (e.g. OpenTSDB)? Making a new HTTP connection whenever you need to send a request is not only inefficient, it also produces wrong results when system limits are reached. For example, we ran into TIME_WAIT port exhaustion problems when running the benchmark. When such limits are hit, benchmark results are no longer valid. Thanks!

Issue building using maven

I'm following the Quick Start instructions in the README.md file.

When I run the command

mvn clean package -Dmaven.test.skip=true

I get an error that the iotdb-session artifact could not be found.

Could not find artifact org.apache.iotdb:iotdb-session:jar:0.9.0-SNAPSHOT

I was unable to find any proper dependency related to iotdb-session. Can you help resolve this issue?

OS is Ubuntu 16.04

OpenTSDB中实现“带时间过滤的聚合查询”(Q4)有误

Q4 (带时间过滤的聚合查询)要实现的是:select func(v1) ... from data where ...;这种查询应该只返回一个数值。比如:select count(v1) ... from data where ...; 返回的是这个时间区域里一共有多少个数据点。翻译成OpenTSDB应该是 downsample=0all-count。而现在的aggRangeQuery用的是aggregator=count。这是完全不同的意思。会返回时间区域里所有点。因而导致OpenTSDB的这种查询比其他数据库慢很多。

Bug in class SingletonWorkload

There is a logical bug in class SingletonWorkload. In its getOneBatch() function, the case of statement can't fit to the right meaning of config.OVERFLOW_MODE. In fact, case 0 should be getDistOutOfOrderBatch(), and case 1 should be getLocalOutOfOrderBatch().

New requirements

some requirements:
1.support datatype "TEXT" when using session mode to insert data into iotdb
2.support for defining text lengths
3.support μs and ns timestamp

InfluxDB写测试失败点统计问题

新版的InfluxDB写测试失败点统计是通过执行select count查询的方式,但是数据量大的时候会产生如下异常:
Exception in thread "main" org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: timeout
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:514)
……
Caused by: java.net.SocketTimeoutException: timeout
at okio.Okio$4.newTimeoutException(Okio.java:230)
……

导致写入已经完成但是实验统计结果无法产生

Running against TDengine failed

Running benchmark.sh under tdengine/target/tdengine-0.0.1 results in the following exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no taos in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
        at java.lang.Runtime.loadLibrary0(Runtime.java:871)
        at java.lang.System.loadLibrary(System.java:1122)
        at com.taosdata.jdbc.TSDBJNIConnector.<clinit>(TSDBJNIConnector.java:38)
        at com.taosdata.jdbc.TSDBDriver.connect(TSDBDriver.java:126)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:270)
        at cn.edu.tsinghua.iotdb.benchmark.tdengine.TDengine.init(TDengine.java:73)
        at cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper.init(DBWrapper.java:386)
        at cn.edu.tsinghua.iotdb.benchmark.mode.BaseMode.registerSchema(BaseMode.java:59)
        at cn.edu.tsinghua.iotdb.benchmark.mode.TestWithDefaultPathMode.run(TestWithDefaultPathMode.java:53)
        at cn.edu.tsinghua.iotdb.benchmark.App.main(App.java:61)

Dependency org.apache.httpcomponents:httpclient, leading to CVE problem

Hi, In /tdengine,there is a dependency **org.apache.httpcomponents:httpclient:jar:4.5.8
** that calls the risk method.

CVE-2020-13956

The scope of this CVE affected version is [,4.5.13)

After further analysis, in this project, the main Api called is org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost

Risk method repair link : GitHub

CVE Bug Invocation Path--

Path Length : 6

cn.edu.tsinghua.iot.benchmark.tdengine.TDengine: registerSchema(java.util.List)Ljava.lang.Double; /.m2/repository/com/taosdata/jdbc/taos-jdbcdriver/2.0.32/taos-jdbcdriver-2.0.32.jar
com.taosdata.jdbc.rs.RestfulStatement: execute(java.lang.String)Z .m2/repository/com/taosdata/jdbc/taos-jdbcdriver/2.0.32/taos-jdbcdriver-2.0.32.jar
com.taosdata.jdbc.utils.HttpClientPoolUtil: execute(java.lang.String,java.lang.String,java.lang.String)Ljava.lang.String; .m2/repository/com/taosdata/jdbc/taos-jdbcdriver/2.0.32/taos-jdbcdriver-2.0.32.jar
org.apache.http.impl.client.CloseableHttpClient: execute(org.apache.http.client.methods.HttpUriRequest,org.apache.http.protocol.HttpContext)Lorg.apache.http.client.methods.CloseableHttpResponse; .m2/repository/org/slf4j/jcl-over-slf4j/1.7.30/jcl-over-slf4j-1.7.30.jar
org.apache.http.impl.client.CloseableHttpClient: determineTarget(org.apache.http.client.methods.HttpUriRequest)Lorg.apache.http.HttpHost; .m2/repository/org/slf4j/jcl-over-slf4j/1.7.30/jcl-over-slf4j-1.7.30.jar
org.apache.http.client.utils.URIUtils: extractHost(java.net.URI)Lorg.apache.http.HttpHost;


Dependency tree--

[INFO] cn.edu.tsinghua:tdengine:jar:1.0.0
[INFO] +- cn.edu.tsinghua:core:jar:1.0.0:compile
[INFO] |  +- commons-cli:commons-cli:jar:1.3.1:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] |  +- org.weakref:jmxutils:jar:1.21:compile
[INFO] |  +- postgresql:postgresql:jar:9.1-901-1.jdbc4:compile
[INFO] |  +- mysql:mysql-connector-java:jar:5.1.44:compile
[INFO] |  +- com.alibaba:fastjson:jar:1.2.31:compile
[INFO] |  +- joda-time:joda-time:jar:2.10.1:compile
[INFO] |  +- net.agkn:hll:jar:1.6.0:compile
[INFO] |  |  \- it.unimi.dsi:fastutil:jar:6.5.11:compile
[INFO] |  +- com.clearspring.analytics:stream:jar:2.9.8:compile
[INFO] |  +- org.apache.kafka:kafka_2.10:jar:0.8.2.0:compile
[INFO] |  |  +- org.apache.kafka:kafka-clients:jar:0.8.2.0:compile
[INFO] |  |  |  +- net.jpountz.lz4:lz4:jar:1.2.0:compile
[INFO] |  |  |  \- org.xerial.snappy:snappy-java:jar:1.1.1.6:compile
[INFO] |  |  +- com.yammer.metrics:metrics-core:jar:2.2.0:compile
[INFO] |  |  +- org.scala-lang:scala-library:jar:2.10.4:compile
[INFO] |  |  +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
[INFO] |  |  |  +- jline:jline:jar:0.9.94:compile
[INFO] |  |  |  \- io.netty:netty:jar:3.7.0.Final:compile
[INFO] |  |  +- net.sf.jopt-simple:jopt-simple:jar:3.2:compile
[INFO] |  |  \- com.101tec:zkclient:jar:0.3:compile
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |  \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  +- javax.activation:activation:jar:1.1:compile
[INFO] |  +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] |  |  +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
[INFO] |  |  +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] |  |  +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] |  |  \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] |  \- com.opencsv:opencsv:jar:5.5.2:compile
[INFO] |     +- org.apache.commons:commons-text:jar:1.9:compile
[INFO] |     +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] |     |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |     \- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] +- com.taosdata.jdbc:taos-jdbcdriver:jar:2.0.32:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.8:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.11:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  \- com.google.guava:guava:jar:29.0-jre:compile
[INFO] |     +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |     +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |     +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |     +- org.checkerframework:checker-qual:jar:2.11.1:compile
[INFO] |     +- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
[INFO] |     \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.30:compile
[INFO] +- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.30:compile
[INFO] +- junit:junit:jar:4.13.1:compile
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] \- log4j:log4j:jar:1.2.17:compile

Suggested solutions:

Update dependency version

Thank you very much.

Query results are all zeroes

I set the following parameter in the config file
OPERATION_PROPORTION=0:0:0:0:0:0:0:1:0
and all the results are zero
--------------------------------------------------Result Matrix--------------------------------------------------
Operation okOperation okPoint failOperation failPoint elapseRate accRate
INGESTION 0 0 0 0 0.00 0.00
PRECISE_POINT 0 0 0 0 0.00 0.00
TIME_RANGE 0 0 0 0 0.00 0.00
VALUE_RANGE 0 0 0 0 0.00 0.00
AGG_RANGE 0 0 0 0 0.00 0.00
AGG_VALUE 0 0 0 0 0.00 0.00
AGG_RANGE_VALUE 0 0 0 0 0.00 0.00
GROUP_BY 0 0 0 0 0.00 0.00
LATEST_POINT 0 0 0 0 0.00 0.00

-----------------------------------------------Latency (ms) Matrix-----------------------------------------------
Operation AVG MID_AVG MIN P10 P25 MEDIAN P75 P90 P95 P99 MAX MAX_SUM
INGESTION 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
PRECISE_POINT 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
TIME_RANGE 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
VALUE_RANGE 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
AGG_RANGE 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
AGG_VALUE 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
AGG_RANGE_VALUE 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
GROUP_BY 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
LATEST_POINT 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

------Client Test Complete Time------
Fri Oct 11 12:46:41 IST 2019

An error happened when I run benchmark.sh

我在本地上下载了iotdb0.11以及iotdb-benchmark,路径如下

calc@calc:/download/iotdb-benchmark-master$
calc@calc:
/download/apache-iotdb-0.11.0$

需要的前置软件如maven都下载好了。
在本地路径/download/iotdb-benchmark-master下build

calc@calc:~/download/iotdb-benchmark-master$ mvn clean package -Dmaven.test.skip=true
build项目成功。

按照README.md修改conf后运行benchmark.sh时出错:

calc@calc:~/download/iotdb-benchmark-master$ ./benchmark.sh
/home/calc/download/iotdb-benchmark-master
错误: 找不到或无法加载主类 cn.edu.tsinghua.iotdb.benchmark.App

尝试在benchmark下的iotdb-0.11 内build出错了。
calc@calc:~/download/iotdb-benchmark-master/iotdb-0.11$ mvn clean package -Dmaven.test.skip=true

出现error:
[INFO] Total time: 0.326 s
[INFO] Finished at: 2021-05-05T21:55:44+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project iotdb-0.11: Could not resolve dependencies for project cn.edu.tsinghua:iotdb-0.11:jar:0.0.1: Failure to find cn.edu.tsinghua:core:jar:0.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]

未解决该error,在下级目录位置运行benchmark.sh出现error。

calc@calc:~/download/iotdb-benchmark-master/iotdb-0.11/target/iotdb-0.11-0.0.1$ ./benchmark.sh
/home/calc/download/iotdb-benchmark-master/iotdb-0.11/target/iotdb-0.11-0.0.1
2021-05-05 21:57:00,865 ERROR cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper:41 - Failed to get database because
java.sql.SQLException: didn't support this database
at cn.edu.tsinghua.iotdb.benchmark.tsdb.DBFactory.getDatabase(DBFactory.java:69)
at cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper.(DBWrapper.java:39)
at cn.edu.tsinghua.iotdb.benchmark.App.testWithDefaultPath(App.java:95)
at cn.edu.tsinghua.iotdb.benchmark.App.main(App.java:65)
Exception in thread "main" java.lang.NullPointerException
at cn.edu.tsinghua.iotdb.benchmark.tsdb.DBWrapper.close(DBWrapper.java:301)
at cn.edu.tsinghua.iotdb.benchmark.App.testWithDefaultPath(App.java:120)
at cn.edu.tsinghua.iotdb.benchmark.App.main(App.java:65)

configuring time based queries

I am not able to figure out what configuration parameters to use to
(i) change the result point number for a query
(ii) set query_span
(iii) set the time interval (in percentage)
from the paper nor from the readme

ClientThread类62行bug

		if (config.DB_SWITCH.equals("IoTDB") && !config.USE_PREPARE_STATEMENT
				&& config.USE_SESSION) {
			session = new Session(config.host, config.port, Constants.USER, Constants.PASSWD);
		}
		try {
			session.open();
		} catch (IoTDBSessionException e) {
			e.printStackTrace();
		}

当config中USE_SESSION是false的时候,这里会报错

Error in OverFlow Mode

When I was using benchmark to test iotdb,I found an error in overflow mode.
I used almost same 'config.properties' files in two tests.
Just set
1st : "IS_OVERFLOW=false";
2nd : "IS_OVERFLOW=true",
then I got an error when benchmark working on overflow mode:

image

image

In the same config with no overflow :
image

Plesae help us to check this issue.Thanks
B.R

在初始化项目使用mvn clean package -Dmaven.test.skip=true命令出现错误

使用mvn clean package -Dmaven.test.skip=true 后显示 Benchmark Core FAILURE,然后就BUILD FAILURE 错误原因如下:
Failed to execute goal on project core: Could not resolve dependencies for project cn.edu.tsinghua:core:jar:0.0.1: Failed to collect dependencies at org.glassfish.jaxb:jaxb-runtime:jar:2.3.0-b170127.1453 -> org.glassfish.jaxb:jaxb-core:jar:2.3.0-b170127.1453 -> javax.xml.bind:jaxb-api:jar:2.3.0-b161121.1438: Failed to read artifact descriptor for javax.xml.bind:jaxb-api:jar:2.3.0-b161121.1438: Could not transfer artifact javax.xml.bind:jaxb-api:pom:2.3.0-b161121.1438 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [releases.java.net (http://maven.java.net/content/repositories/releases/, default, releases+snapshots), shapshots.java.net (http://maven.java.net/content/repositories/snapshots/, default, releases+snapshots), jvnet-nexus-staging (http://maven.java.net/content/repositories/staging/, default, releases+snapshots), netbeans (http://bits.netbeans.org/nexus/content/groups/netbeans, default, releases)] -> [Help 1]

该怎么解决,没法使用,谢谢,急求

Endless loop in ServerMode

Hi, i tried to run the rep-benchmark.sh (that uses cli-benchmark.sh internally) and saw that some configs in the cli script needed to be changed to run it on my two VMs (client, server). Therefore I changed them to use the correct PATH values but still ended up with some questions as the shell scripts seem to be rather outdated:

  1. The DB_DATA_PATH does not exists in the config.properties and Config.java files anymore.
  2. Some grep calls need to be updated as they confict with ANOTHER_* values (the two i found were grep "DB_SWITCH" that should use grep "^DB_SWITCH" and grep "HOST" to grep "^HOST" to only return the non-another values).
  3. The ServerMode.java run method doesn't terminate when a log_stop_flag is found since #167. Therfore I think this mode ends up in an endless loop since no other break condition exists. (And since the cli script starts the server mode as a background task it's not obvious that some processes are still running.)

A quick search in the code reveals that log_stop_flag and DB_DATA_PATH are never used in the Java code. (But are used in most of the shell scripts.)

I wanted to ask if this is a bug or if there is an un-documented way to run the benchmark in a client-server setup (where the server only has the database and serverMode running and the client the actual benchmark)?

README needs updating

'config.properties':

  • CACHE_NUM is now changed to BATCH_SIZE, I guess
  • IS_GEN_DATA doesn't exist now
  • The usage of BENCHMARK_WORK_MODE is not mentioned in the Readme. For example, if I want to use the "Sample Data Generation" feature, I should use model insertTestWithUserDefinedPath. But this point is missing in the readme.

Some error with IS_CLIENT_BIND

#客户端和设备是否绑定,若为false则客户端数可以大于设备数
IS_CLIENT_BIND=false
#客户端并发数,若客户端和设备绑定,则必须小于等于设备数
CLIENT_NUMBER=1
#存储组数,必须小于等于设备数
GROUP_NUMBER=1
#总设备数
DEVICE_NUMBER=1000
#每个设备的传感器数,总时间序列条数=DEVICE_NUMBER*SENSOR_NUMBER
SENSOR_NUMBER=100
#批写入数据行数,每行是某个设备所有传感器在某一时间戳的数据,每个batch写入数据点数=SENSOR_NUMBER*BATCH_SIZE
BATCH_SIZE=100
#每个客户端线程的操作数
LOOP=100

当IS_CLIENT_BIND为fasle的时候,如上所示,client线程,只会跑100个loop,插入点数为100*10000
image

编译的时候出错

mvn clean package -Dmaven.test.skip=true
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< cn.edu.tsinghua:iotdb-benchmark >-------------------
[INFO] Building iotdb-benchmark 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.apache.iotdb:iotdb-jdbc:jar:0.11.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.apache.iotdb:iotdb-session:jar:0.11.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.514 s
[INFO] Finished at: 2020-08-13T15:31:32+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project iotdb-benchmark: Could not resolve dependencies for project cn.edu.tsinghua:iotdb-benchmark:jar:0.0.1: The following artifacts could not be resolved: org.apache.iotdb:iotdb-jdbc:jar:0.11.0-SNAPSHOT, org.apache.iotdb:iotdb-session:jar:0.11.0-SNAPSHOT: Could not find artifact org.apache.iotdb:iotdb-jdbc:jar:0.11.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

More query workload implementation

There are some query workloads that are not implemented.

  • valueRangeQuery

  • aggRangeQuery

  • aggValueQuery

  • aggRangeValueQuery

  • groupByQuery

  • latestPointQuery

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.