javeme commented on code in PR #1984:
URL: 
https://github.com/apache/incubator-hugegraph/pull/1984#discussion_r1011950251


##########
hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/SubgraphStatAlgorithm.java:
##########
@@ -129,12 +128,11 @@ protected static boolean copySchema(Map<String, Object> 
parameters) {
 
     private static class Traverser extends AlgoTraverser {
 
-        private static Map<String, Object> PARAMS = ImmutableMap.of(
-                                                    "depth", 10L,
-                                                    "degree", -1L,
-                                                    "sample", -1L,
-                                                    "top", -1L /* sorted */,
-                                                    "workers", 0);
+        private static final Map<String, Object> PARAMS = 
ImmutableMap.of("depth", 10L,

Review Comment:
   the line is too long...



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/AbstractAlgorithm.java:
##########
@@ -382,9 +381,7 @@ protected Iterator<Vertex> vertices(Object label, long 
limit) {
             ConditionQuery query = new ConditionQuery(HugeType.VERTEX);
             query.capacity(Query.NO_CAPACITY);
             query.limit(limit);
-            if (label != null) {
-                query.eq(HugeKeys.LABEL, this.getVertexLabelId(label));
-            }
+            query.eq(HugeKeys.LABEL, this.getVertexLabelId(label));

Review Comment:
   ok



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/Consumers.java:
##########
@@ -92,7 +92,7 @@ private Void runAndDone() {
             this.run();
             this.done();
         } catch (Throwable e) {
-            // Only the first exception of one thread can be stored
+            // Only the first exception to one thread can be stored

Review Comment:
   prefer to keep the origin comment



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/LouvainTraverser.java:
##########
@@ -321,9 +319,7 @@ private Community wrapCommunity(Vertex v, List<Edge> nbs) {
         return comm;
     }
 
-    private Collection<Pair<Community, MutableInt>> nbCommunities(
-                                                    int pass,
-                                                    List<Edge> edges) {
+    private Collection<Pair<Community, MutableInt>> nbCommunities(int pass, 
List<Edge> edges) {

Review Comment:
   wrap line after `int pass, `?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to