未验证 提交 9e5f824a 编写于 作者: J Jialin Qiao 提交者: GitHub

Add doc for MeasurementSchema in Tablet (#1534)

* fix tablet doc
上级 db48ebbc
......@@ -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);
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册