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/11/19 10:56:20 UTC

[GitHub] [iotdb] handsomeli1898 opened a new pull request #4436: [IoTDB-1984]2 changes in DataMigration

handsomeli1898 opened a new pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436


   ## Description
   2 changes in DataMigration
   
   ### Content1 ...
   The first one change is that "count timeseries <path>" should be placed by "count timeseries <path> **", and so does the "show timeseries <path>"
   ### Content2 ...
   The second one is that after loop "while (schemaIter.next())", measurementsInCurrentDevice may be not empty, so must deal with it
   
   ### Content3 ...
   
   <!--
   In each section, please describe design decisions made, including:
    - Choice of algorithms
    - Behavioral aspects. What configuration values are acceptable? How are corner cases and error 
       conditions handled, such as when there are insufficient resources?
    - Class organization and design (how the logic is split between classes, inheritance, composition, 
       design patterns)
    - Method organization and design (how the logic is split between methods, parameters and return types)
    - Naming (class, method, API, configuration, HTTP endpoint, names of emitted metrics)
   -->
   
   
   <!-- It's good to describe an alternative design (or mention an alternative name) for every design 
   (or naming) decision point and compare the alternatives with the designs that you've implemented 
   (or the names you've chosen) to highlight the advantages of the chosen designs and names. -->
   
   <!-- If there was a discussion of the design of the feature implemented in this PR elsewhere 
   (e. g. a "Proposal" issue, any other issue, or a thread in the development mailing list), 
   link to that discussion from this PR description and explain what have changed in your final design 
   compared to your original proposal or the consensus version in the end of the discussion. 
   If something hasn't changed since the original discussion, you can omit a detailed discussion of 
   those aspects of the design here, perhaps apart from brief mentioning for the sake of readability 
   of this PR description. -->
   
   <!-- Some of the aspects mentioned above may be omitted for simple and small changes. -->
   
   <hr>
   
   This PR has:
   - [ ] been self-reviewed.
       - [ ] concurrent read
       - [ ] concurrent write
       - [ ] concurrent read and write 
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. 
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious 
     for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold 
     for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items 
   apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items 
   from the checklist above are strictly necessary, but it would be very helpful if you at least 
   self-review the PR. -->
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) in this PR
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #4436: [IOTDB-1984] Upgrade the data migration granularity to device

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436#discussion_r763637417



##########
File path: example/session/src/main/java/org/apache/iotdb/DataMigrationExample.java
##########
@@ -82,19 +96,36 @@ public static void main(String[] args)
     }
     readerPool.closeResultSet(schemaDataSet);
 
-    schemaDataSet = readerPool.executeQueryStatement("show timeseries " + path);
+    schemaDataSet = readerPool.executeQueryStatement("show devices " + path + ".**");
     schemaIter = schemaDataSet.iterator();
 
     List<Future> futureList = new ArrayList<>();
     int count = 0;
+    int seriesNumInOneTask = 0;
+    String currentDevice = "";
+    List<String> measurementsInCurrentDevice = new ArrayList<>();
+    List<TSDataType> dataTypesInCurrentDevice = new ArrayList<>();
     while (schemaIter.next()) {
+      Path currentPath = new Path(schemaIter.getString("devices"), true);
+      currentDevice = currentPath.getDevice();
+      SessionDataSetWrapper currentDivice_DataSet =
+          readerPool.executeQueryStatement("show timeseries " + currentPath + ".**");
+      DataIterator currentDivice_Iter = currentDivice_DataSet.iterator();
+      while (currentDivice_Iter.next()) {
+        Path currenttimePath = new Path(currentDivice_Iter.getString("timeseries"), true);
+        measurementsInCurrentDevice.add(currenttimePath.getMeasurement());
+        dataTypesInCurrentDevice.add(TSDataType.valueOf(currentDivice_Iter.getString("dataType")));

Review comment:
       Hi, if there is a large number of measurements, like over 100,000 measurements, in one device, is there any problem?




-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] qiaojialin closed pull request #4436: [IOTDB-1984] Upgrade the data migration granularity to device

Posted by GitBox <gi...@apache.org>.
qiaojialin closed pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436


   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4436: [IoTDB-1984]2 changes in DataMigration

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436#issuecomment-974023176


   
   [![Coverage Status](https://coveralls.io/builds/44428144/badge)](https://coveralls.io/builds/44428144)
   
   Coverage decreased (-0.006%) to 66.963% when pulling **e49371ac3609a3fba6dd28f2d902a3ce8884d0b6 on handsomeli1898:jira2000** into **1eb9e0e24e5829d8f54c5f8573d3ae41bab3f861 on apache:master**.
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls commented on pull request #4436: [IoTDB-1984]2 changes in DataMigration

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436#issuecomment-974023176


   
   [![Coverage Status](https://coveralls.io/builds/44403622/badge)](https://coveralls.io/builds/44403622)
   
   Coverage decreased (-0.006%) to 66.963% when pulling **e4fb8d864cbcafb314939d0089d5e73534272550 on handsomeli1898:jira2000** into **1eb9e0e24e5829d8f54c5f8573d3ae41bab3f861 on apache:master**.
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #4436: [IOTDB-1984] Upgrade the data migration granularity to device

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436#discussion_r753886372



##########
File path: example/session/src/main/java/org/apache/iotdb/DataMigrationExample.java
##########
@@ -174,13 +214,13 @@ public Void call() {
 
       } catch (Exception e) {
         System.out.println(
-            "Loading the " + i + "-th timeseries: " + series + " failed " + e.getMessage());
+            "Loading the " + i + "-th devices: " + device + " failed " + e.getMessage());
         return null;
       } finally {
         readerPool.closeResultSet(dataSet);
       }
 
-      System.out.println("Loading the " + i + "-th timeseries: " + series + " success");
+      System.out.println("Loading the " + i + "-th devices: " + device + " success");

Review comment:
       The printed number of loaded devices is not correct, right? I think the better choice is keeping printing the number of timeseries. 
   
   To implement it, we can use an AtomicInteger or AtomicLong field to record the number of loaded timeseries. 




-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4436: [IOTDB-1984] Upgrade the data migration granularity to device

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436#issuecomment-974023176


   
   [![Coverage Status](https://coveralls.io/builds/44740896/badge)](https://coveralls.io/builds/44740896)
   
   Coverage increased (+0.3%) to 67.291% when pulling **8726ab276acd493fa1e00188e3b58f6bdb329239 on handsomeli1898:jira2000** into **1eb9e0e24e5829d8f54c5f8573d3ae41bab3f861 on apache:master**.
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #4436: [IoTDB-1984]2 changes in DataMigration

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436#discussion_r753886372



##########
File path: example/session/src/main/java/org/apache/iotdb/DataMigrationExample.java
##########
@@ -174,13 +214,13 @@ public Void call() {
 
       } catch (Exception e) {
         System.out.println(
-            "Loading the " + i + "-th timeseries: " + series + " failed " + e.getMessage());
+            "Loading the " + i + "-th devices: " + device + " failed " + e.getMessage());
         return null;
       } finally {
         readerPool.closeResultSet(dataSet);
       }
 
-      System.out.println("Loading the " + i + "-th timeseries: " + series + " success");
+      System.out.println("Loading the " + i + "-th devices: " + device + " success");

Review comment:
       The number of loaded devices is not correct, right? Is there any way to print the correct number?




-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4436: [IoTDB-1984]2 changes in DataMigration

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4436:
URL: https://github.com/apache/iotdb/pull/4436#issuecomment-974023176


   
   [![Coverage Status](https://coveralls.io/builds/44428144/badge)](https://coveralls.io/builds/44428144)
   
   Coverage decreased (-0.006%) to 66.963% when pulling **e49371ac3609a3fba6dd28f2d902a3ce8884d0b6 on handsomeli1898:jira2000** into **1eb9e0e24e5829d8f54c5f8573d3ae41bab3f861 on apache:master**.
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org