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/05 07:17:25 UTC

[GitHub] [iotdb] zyk990424 commented on a change in pull request #4326: [IOTDB-1883] Extension of schema template to tree-structured

zyk990424 commented on a change in pull request #4326:
URL: https://github.com/apache/iotdb/pull/4326#discussion_r743431155



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
##########
@@ -2106,6 +2109,38 @@ public void createSchemaTemplate(CreateTemplatePlan plan) throws MetadataExcepti
     }
   }
 
+  public void appendSchemaTemplate(AppendTemplatePlan plan) throws MetadataException {
+    try {
+      templateManager.appendSchemaTemplate(plan);
+      // write wal
+      if (!isRecovering) {
+        logWriter.appendSchemaTemplate(plan);
+      }
+    } catch (IOException e) {
+      throw new MetadataException(e);
+    }
+  }
+
+  public void pruneSchemaTemplate(PruneTemplatePlan plan) throws MetadataException {
+    try {
+      templateManager.pruneSchemaTemplate(plan);
+      // write wal
+      if (!isRecovering) {
+        logWriter.pruneSchemaTemplate(plan);
+      }
+    } catch (IOException e) {
+      throw new MetadataException(e);
+    }
+  }
+
+  public Template getTemplate(String templateName) throws MetadataException {
+    try {
+      return templateManager.getTemplate(templateName);
+    } catch (UndefinedTemplateException e) {
+      throw new MetadataException(e);
+    }
+  }

Review comment:
       This method maybe unnecessary. MManager could use templateManager.getTemplate directly.




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