This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 9e5f824 Add doc for MeasurementSchema in Tablet (#1534)
9e5f824 is described below
commit 9e5f824a03faf5c84d8e3f3a524d1e1e63a76cb9
Author: Jialin Qiao <[email protected]>
AuthorDate: Wed Jul 22 12:12:34 2020 +0800
Add doc for MeasurementSchema in Tablet (#1534)
* fix tablet doc
---
.../src/main/java/org/apache/iotdb/SessionExample.java | 18 ++++++++++--------
.../org/apache/iotdb/tsfile/write/record/Tablet.java | 5 +++--
2 files changed, 13 insertions(+), 10 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 a6cc09f..038b62a 100644
--- a/example/session/src/main/java/org/apache/iotdb/SessionExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
@@ -238,11 +238,12 @@ public class SessionExample {
* Users need to control the count of Tablet and write a batch when it
reaches the maxBatchSize
*/
private static void insertTablet() throws IoTDBConnectionException,
StatementExecutionException {
- // The schema of sensors of one device
+ // The schema of measurements of one device
+ // only measurementId and data type in MeasurementSchema take effects in
Tablet
List<MeasurementSchema> schemaList = new ArrayList<>();
- schemaList.add(new MeasurementSchema("s1", TSDataType.INT64,
TSEncoding.RLE));
- schemaList.add(new MeasurementSchema("s2", TSDataType.INT64,
TSEncoding.RLE));
- schemaList.add(new MeasurementSchema("s3", TSDataType.INT64,
TSEncoding.RLE));
+ schemaList.add(new MeasurementSchema("s1", TSDataType.INT64));
+ schemaList.add(new MeasurementSchema("s2", TSDataType.INT64));
+ schemaList.add(new MeasurementSchema("s3", TSDataType.INT64));
Tablet tablet = new Tablet("root.sg1.d1", schemaList, 100);
@@ -269,11 +270,12 @@ public class SessionExample {
}
private static void insertTablets() throws IoTDBConnectionException,
StatementExecutionException {
- // The schema of sensors of one device
+ // The schema of measurements of one device
+ // only measurementId and data type in MeasurementSchema take effects in
Tablet
List<MeasurementSchema> schemaList = new ArrayList<>();
- schemaList.add(new MeasurementSchema("s1", TSDataType.INT64,
TSEncoding.RLE));
- schemaList.add(new MeasurementSchema("s2", TSDataType.INT64,
TSEncoding.RLE));
- schemaList.add(new MeasurementSchema("s3", TSDataType.INT64,
TSEncoding.RLE));
+ schemaList.add(new MeasurementSchema("s1", TSDataType.INT64));
+ schemaList.add(new MeasurementSchema("s2", TSDataType.INT64));
+ schemaList.add(new MeasurementSchema("s3", TSDataType.INT64));
Tablet tablet1 = new Tablet("root.sg1.d1", schemaList, 100);
Tablet tablet2 = new Tablet("root.sg1.d2", schemaList, 100);
diff --git
a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/Tablet.java
b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/Tablet.java
index 1ead641..d159f63 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/Tablet.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/Tablet.java
@@ -74,7 +74,8 @@ public class Tablet {
* constructor (all Tablet should be the same size).
*
* @param deviceId the name of the device specified to be written in
- * @param timeseries the list of measurement schemas for creating the tablet
+ * @param timeseries the list of measurement schemas for creating the tablet,
+ * only measurementId and type take effects
*/
public Tablet(String deviceId, List<MeasurementSchema> timeseries) {
this(deviceId, timeseries, DEFAULT_SIZE);
@@ -87,7 +88,7 @@ public class Tablet {
*
* @param deviceId the name of the device specified to be written in
* @param schemas the list of measurement schemas for creating the row
- * batch
+ * batch, only measurementId and type take effects
* @param maxRowNumber the maximum number of rows for this tablet
*/
public Tablet(String deviceId, List<MeasurementSchema> schemas, int
maxRowNumber) {