samperson1997 commented on a change in pull request #1345:
URL: https://github.com/apache/incubator-iotdb/pull/1345#discussion_r440731729
##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mnode/MNode.java
##########
@@ -127,4 +201,43 @@ public String getName() {
public void setName(String name) {
this.name = name;
}
+
+ public void setChildren(Map<String, MNode> children) {
+ this.children = children;
+ }
+
+ public void serializeTo(BufferedWriter bw) throws IOException {
+ serializeChildren(bw);
+
+ String s = String.valueOf(MetadataConstant.MNODE_TYPE);
+ s += "," + name + ",";
Review comment:
Emm... As is mentioned in [this
page](https://stackoverflow.com/questions/44117788/performance-between-string-format-and-stringbuilder)
which compares the performance between String.format and StringBuilder thanks
to @Alima777 , I'll use StringBuilder anyway.
----------------------------------------------------------------
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]