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


##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseTable.java:
##########
@@ -283,7 +283,8 @@ protected BackendEntryIterator newEntryIterator(Query query,
         });
     }
 
-    protected void parseRowColumns(Result row, BackendEntry entry, Query 
query, boolean enablePartition)
+    protected void parseRowColumns(Result row, BackendEntry entry, Query query,
+                                    boolean enablePartition)

Review Comment:
   align with "Result"



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java:
##########
@@ -84,6 +86,7 @@
 import com.google.common.util.concurrent.Futures;
 
 public class HbaseSessions extends BackendSessionPool {
+    private static final Logger LOG = Log.logger(HbaseSessions.class);

Review Comment:
   add a blank line after class define



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseStore.java:
##########
@@ -445,7 +447,8 @@ public static class HbaseSchemaStore extends HbaseStore {
 
         public HbaseSchemaStore(HugeConfig config, BackendStoreProvider 
provider,
                                 String namespace, String store) {
-            super(provider, namespace, store, 
config.get(HbaseOptions.HBASE_ENABLE_PARTITION).booleanValue());
+            super(provider, namespace, store, config.get(HbaseOptions

Review Comment:
   wrap line before config



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java:
##########
@@ -793,18 +798,18 @@ public long storeSize(String table) throws IOException {
          */
         @SuppressWarnings("unused")
         private void dump(String table, Scan scan) throws IOException {
-            System.out.println(String.format(">>>> scan table %s with %s",
+            LOG.info(String.format(">>>> scan table %s with %s",

Review Comment:
   LOG.info(">>>> scan table {} with {}",



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java:
##########
@@ -793,18 +798,18 @@ public long storeSize(String table) throws IOException {
          */
         @SuppressWarnings("unused")
         private void dump(String table, Scan scan) throws IOException {
-            System.out.println(String.format(">>>> scan table %s with %s",
+            LOG.info(String.format(">>>> scan table %s with %s",
                                              table, scan));
             RowIterator iterator = this.scan(table, scan);
             while (iterator.hasNext()) {
                 Result row = iterator.next();
-                System.out.println(StringEncoding.format(row.getRow()));
+                LOG.info(StringEncoding.format(row.getRow()));
                 CellScanner cellScanner = row.cellScanner();
                 while (cellScanner.advance()) {
                     Cell cell = cellScanner.current();
                     byte[] key = CellUtil.cloneQualifier(cell);
                     byte[] val = CellUtil.cloneValue(cell);
-                    System.out.println(String.format("  %s=%s",
+                    LOG.info(String.format("  %s=%s",

Review Comment:
   ditto



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseStore.java:
##########
@@ -492,7 +495,8 @@ public static class HbaseGraphStore extends HbaseStore {
         private boolean enablePartition;
         public HbaseGraphStore(HugeConfig config, BackendStoreProvider 
provider,
                                String namespace, String store) {
-            super(provider, namespace, store, 
config.get(HbaseOptions.HBASE_ENABLE_PARTITION).booleanValue());
+            super(provider, namespace, store, 
config.get(HbaseOptions.HBASE_ENABLE_PARTITION)

Review Comment:
   wrap line before config



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java:
##########
@@ -222,19 +225,21 @@ public void createTable(String table, List<byte[]> cfs) 
throws IOException {
                                                              .build());
         }
         tdb.setCoprocessor(COPROCESSOR_AGGR);
-        try(Admin admin = this.hbase.getAdmin()) {
+        try (Admin admin = this.hbase.getAdmin()) {
             admin.createTable(tdb.build());
         }
     }
 
-    public void createPreSplitTable(String table, List<byte[]> cfs, short 
numOfPartitions) throws IOException {
+    public void createPreSplitTable(String table, List<byte[]> cfs, 
+                                    short numOfPartitions) throws IOException {
         TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(
                 TableName.valueOf(this.namespace, table));
         for (byte[] cf : cfs) {
             
builder.setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(cf)
                     .build());
         }
-        byte[][] splits = new byte[numOfPartitions - 
1][org.apache.hadoop.hbase.util.Bytes.SIZEOF_SHORT];
+        byte[][] splits = new byte[numOfPartitions - 1][org.apache.hadoop

Review Comment:
   prefer to wrap line before "[org"



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseStore.java:
##########
@@ -54,7 +54,7 @@ public abstract class HbaseStore extends 
AbstractBackendStore<Session> {
 
     private static final Logger LOG = Log.logger(HbaseStore.class);
 
-    private final BackendFeatures FEATURES;
+    private final BackendFeatures features;

Review Comment:
   also update references



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