samperson1997 opened a new pull request #2851:
URL: https://github.com/apache/iotdb/pull/2851
For cluster, `createMultiTimeseries` is used for auto create schema.
Here is an example:
```
private static void createMultiTimeseries()
throws IoTDBConnectionException, StatementExecutionException {
List<String> paths = new ArrayList<>();
paths.add("root.sg1.d1.(s0,s1,s2)");
paths.add("root.sg1.d1.s3");
List<TSDataType> tsDataTypes = new ArrayList<>();
tsDataTypes.add(TSDataType.INT64);
tsDataTypes.add(TSDataType.DOUBLE);
tsDataTypes.add(TSDataType.FLOAT);
tsDataTypes.add(TSDataType.INT64);
List<TSEncoding> tsEncodings = new ArrayList<>();
tsEncodings.add(TSEncoding.RLE);
tsEncodings.add(TSEncoding.RLE);
tsEncodings.add(TSEncoding.RLE);
tsEncodings.add(TSEncoding.RLE);
List<CompressionType> compressionTypes = new ArrayList<>();
compressionTypes.add(CompressionType.SNAPPY);
compressionTypes.add(CompressionType.SNAPPY);
session.createMultiTimeseries(
paths, tsDataTypes, tsEncodings, compressionTypes, null, null, null,
null);
// show timeseries
SessionDataSet dataSet = session.executeQueryStatement("show
timeseries");
while (dataSet.hasNext()) {
System.out.println(dataSet.next());
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]