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 2019/03/27 09:56:41 UTC
[GitHub] [incubator-iotdb] mdf369 commented on a change in pull request
#114: add check SG for MManager, MGraph and MTree
mdf369 commented on a change in pull request #114: add check SG for MManager, MGraph and MTree
URL: https://github.com/apache/incubator-iotdb/pull/114#discussion_r269480303
##########
File path: iotdb/src/main/java/org/apache/iotdb/db/metadata/MTree.java
##########
@@ -212,6 +212,34 @@ public void setStorageGroup(String path) throws PathErrorException {
setDataFileName(path, cur);
}
+ /**
+ * check whether the input path is storage group or not
+ * @param path input path
+ * @return if it is storage group, return true. Else return false
+ */
+ public boolean checkStorageGroup(String path) {
+ String[] nodeNames = path.split(DOUB_SEPARATOR);
+ MNode cur = root;
+ if (nodeNames.length <= 1 || !nodeNames[0].equals(root.getName())) {
Review comment:
I don't see the difference?
This is same as the implementation of setStorageGroup().
----------------------------------------------------------------
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
With regards,
Apache Git Services