wshao08 commented on a change in pull request #1732:
URL: https://github.com/apache/incubator-iotdb/pull/1732#discussion_r495514361



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
##########
@@ -503,7 +503,22 @@ private void findStorageGroup(
   }
 
   /**
-   * Get all storage group under give path
+   * Get the storage group that given path belonged to or under given path

Review comment:
       done

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/PartialPath.java
##########
@@ -99,6 +105,41 @@ public PartialPath concatNode(String node) {
     return nodes;
   }
 
+  public int getNodeLength() {

Review comment:
       fixed

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/PartialPath.java
##########
@@ -99,6 +105,41 @@ public PartialPath concatNode(String node) {
     return nodes;
   }
 
+  public int getNodeLength() {
+    return nodes.length;
+  }
+
+  public PartialPath alterPrefixPath(PartialPath prefixPath) {
+    String[] newNodes = Arrays.copyOf(nodes, Math.max(nodes.length, 
prefixPath.getNodeLength()));
+    System.arraycopy(prefixPath.getNodes(), 0, newNodes, 0, 
prefixPath.getNodeLength());
+    return new PartialPath(newNodes);
+  }
+
+  public void setPrefixPath(PartialPath prefixPath) {
+    this.nodes = Arrays.copyOf(nodes, Math.max(nodes.length, 
prefixPath.getNodeLength()));
+    System.arraycopy(prefixPath.getNodes(), 0, nodes, 0, 
prefixPath.getNodeLength());
+    fullPath = String.join(TsFileConstant.PATH_SEPARATOR, nodes);
+  }
+
+  public boolean matchFullPath(String rPath) throws IllegalPathException {
+    return matchFullPath(new PartialPath(rPath));
+  }
+
+  public boolean matchFullPath(PartialPath rPath) {

Review comment:
       Added




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


Reply via email to