jixuan1989 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-iotdb/pull/1496#discussion_r462818357



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Path.java
##########
@@ -35,8 +37,11 @@
   private String alias = null;
   private String device = null;
   private String fullPath;
+  private List<String> nodes;

Review comment:
       `String[]` is enough.

##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/merge/task/MergeTask.java
##########
@@ -121,14 +122,16 @@ private void doMerge() throws IOException, 
MetadataException {
     mergeLogger = new MergeLogger(storageGroupSysDir);
 
     mergeLogger.logFiles(resource);
-
-    Set<String> devices = IoTDB.metaManager.getDevices(storageGroupName);
+    List<String> storageGroupNameNodes = 
MetaUtils.splitPathToNodes(storageGroupName);
+    Set<Path> devices = 
IoTDB.metaManager.getDevicePaths(storageGroupNameNodes);
     Map<Path, MeasurementSchema> measurementSchemaMap = new HashMap<>();
     List<Path> unmergedSeries = new ArrayList<>();
-    for (String device : devices) {
-      MNode deviceNode = IoTDB.metaManager.getNodeByPath(device);
+    for (Path device : devices) {
+      MNode deviceNode = IoTDB.metaManager.getNodeByNodes(device.getNodes());
       for (Entry<String, MNode> entry : deviceNode.getChildren().entrySet()) {
-        Path path = new Path(device, entry.getKey());
+        List<String> fullPath = new ArrayList<>(device.getNodes());
+        fullPath.add(entry.getKey());
+        Path path = new Path(fullPath);

Review comment:
       use `String[]`  in Path and then we do not need `List` here.




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


Reply via email to