You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/08/15 13:25:54 UTC

[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #1943: feat(core): cluster role automatic management

imbajin commented on code in PR #1943:
URL: https://github.com/apache/incubator-hugegraph/pull/1943#discussion_r945731147


##########
hugegraph-core/src/main/java/com/baidu/hugegraph/election/MetaData.java:
##########
@@ -0,0 +1,45 @@
+package com.baidu.hugegraph.election;
+
+import java.util.Objects;
+
+public class MetaData {
+
+    String node;
+    long count;
+    int epoch;
+
+    public MetaData(String node, int epoch) {
+        this.node = node;
+        this.epoch = epoch;
+        this.count = 1;
+    }
+
+    public void increaseCount() {
+        this.count ++;

Review Comment:
   extra space



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/election/MetaDataAdapter.java:
##########
@@ -0,0 +1,11 @@
+package com.baidu.hugegraph.election;
+
+import java.util.Optional;
+
+public interface MetaDataAdapter {

Review Comment:
   one more empty line



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/election/MetaData.java:
##########
@@ -0,0 +1,45 @@
+package com.baidu.hugegraph.election;
+
+import java.util.Objects;
+
+public class MetaData {
+
+    String node;
+    long count;

Review Comment:
   do we need long?



-- 
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: commits-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org