You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/04/27 09:22:20 UTC

[GitHub] [incubator-hugegraph] javeme commented on a diff in pull request #1847: fix cassandra&rocksdb&scylladb code checkstyle

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


##########
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBOptions.java:
##########
@@ -168,7 +168,8 @@ public static synchronized RocksDBOptions instance() {
     public static final ConfigOption<Integer> MAX_BG_JOBS =
             new ConfigOption<>(
                     "rocksdb.max_background_jobs",
-                    "Maximum number of concurrent background jobs, including flushes and compactions.",
+                    "Maximum number of concurrent background jobs," +
+                            " including flushes and compactions.",

Review Comment:
   align with "Maximum..." and prefer to put the leading space in the previous line



##########
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java:
##########
@@ -1058,14 +1059,14 @@ private boolean match(int expected) {
         @SuppressWarnings("unused")
         private void dump() {
             this.seek();
-            System.out.println(">>>> scan from " + this.table + ": "  +
-                               (this.keyBegin == null ? "*" :
-                                StringEncoding.format(this.keyBegin)) +
-                               (this.iter.isValid() ? "" : " - No data"));
+            LOG.info(">>>> scan from " + this.table + ": "  +

Review Comment:
   prefer to use log format '{}'



##########
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBStdSessions.java:
##########
@@ -1058,14 +1059,14 @@ private boolean match(int expected) {
         @SuppressWarnings("unused")
         private void dump() {
             this.seek();
-            System.out.println(">>>> scan from " + this.table + ": "  +
-                               (this.keyBegin == null ? "*" :
-                                StringEncoding.format(this.keyBegin)) +
-                               (this.iter.isValid() ? "" : " - No data"));
+            LOG.info(">>>> scan from " + this.table + ": "  +
+                    (this.keyBegin == null ? "*" :
+                            StringEncoding.format(this.keyBegin)) +
+                    (this.iter.isValid() ? "" : " - No data"));
             for (; this.iter.isValid(); this.iter.next()) {
-                System.out.println(String.format("%s=%s",
-                                   StringEncoding.format(this.iter.key()),
-                                   StringEncoding.format(this.iter.value())));
+                LOG.info(StringEncoding.format(this.iter.key()) +

Review Comment:
   since we can use log format '{}', and don't need string format anymore



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

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