You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/03/16 03:01:40 UTC

[GitHub] [iotdb] samperson1997 opened a new pull request #2851: [IOTDB-1235] Refactor createMultiTimeseries

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:
users@infra.apache.org



[GitHub] [iotdb] samperson1997 merged pull request #2851: [IOTDB-1235] Refactor createMultiTimeseries

Posted by GitBox <gi...@apache.org>.
samperson1997 merged pull request #2851:
URL: https://github.com/apache/iotdb/pull/2851


   


----------------------------------------------------------------
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:
users@infra.apache.org