You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/03/02 02:30:10 UTC
[iotdb] 01/03: change experiment code
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ty-graduate
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 407405651ba513252d25fa34789ed080e8412e59
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed Mar 2 09:59:56 2022 +0800
change experiment code
---
.../session/src/main/java/org/apache/iotdb/SessionExample.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/example/session/src/main/java/org/apache/iotdb/SessionExample.java b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
index b2e86b3..4d91ad0 100644
--- a/example/session/src/main/java/org/apache/iotdb/SessionExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
@@ -369,13 +369,13 @@ public class SessionExample {
Tablet tablet = new Tablet(ROOT_SG1_D1, schemaList, 10000);
// Method 1 to add tablet data
- long timestamp = 0;
+ long timestamp = 1646134492000L;
Random random = new Random(123456);
for (long row = 0; row < totalRowNum; row++) {
int rowIndex = tablet.rowSize++;
tablet.addTimestamp(rowIndex, timestamp);
for (int s = 0; s < sensorNum; s++) {
- float value = random.nextFloat();
+ float value = -100.0f + 200.0f * random.nextFloat();
tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
}
if (tablet.rowSize == tablet.getMaxRowNumber()) {
@@ -411,13 +411,13 @@ public class SessionExample {
Tablet tablet = new Tablet(ROOT_SG1_D1, schemaList, 10000);
- long timestamp = 0;
+ long timestamp = 1646134492000L;
Random random = new Random(123456);
for (long row = 0; row < totalRowNum; row++) {
int rowIndex = tablet.rowSize++;
tablet.addTimestamp(rowIndex, timestamp);
for (int s = 0; s < sensorNum; s++) {
- float value = random.nextFloat();
+ float value = -100.0f + 200.0f * random.nextFloat();
tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
}
if (tablet.rowSize == tablet.getMaxRowNumber()) {