foreverneverer commented on code in PR #1104:
URL: https://github.com/apache/incubator-pegasus/pull/1104#discussion_r944152490


##########
java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java:
##########
@@ -2109,43 +2180,68 @@ private void handleWriteLimiterException(DefaultPromise 
promise, String message)
   }
 
   static class Request {
-    byte[] hashKey = null;
-    byte[] sortKey = null;
-    int sortKeyCount = 0;
+    public static final byte[] EMPTY_BYTES = "".getBytes();
+
+    public static int getLength(byte[] value) {

Review Comment:
   put all the function in same block



##########
java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java:
##########
@@ -2109,43 +2180,68 @@ private void handleWriteLimiterException(DefaultPromise 
promise, String message)
   }
 
   static class Request {
-    byte[] hashKey = null;
-    byte[] sortKey = null;
-    int sortKeyCount = 0;
+    public static final byte[] EMPTY_BYTES = "".getBytes();
+
+    public static int getLength(byte[] value) {

Review Comment:
   rename `getValueLength` so that is consist with other function, or you 
rename all of them `getLength`



##########
java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java:
##########
@@ -2109,43 +2180,68 @@ private void handleWriteLimiterException(DefaultPromise 
promise, String message)
   }
 
   static class Request {
-    byte[] hashKey = null;
-    byte[] sortKey = null;
-    int sortKeyCount = 0;
+    public static final byte[] EMPTY_BYTES = "".getBytes();
+
+    public static int getLength(byte[] value) {
+      return value == null ? 0 : value.length;
+    }
+
+    byte[] hashKey = EMPTY_BYTES;
+    byte[] sortKey = EMPTY_BYTES;
+    int sortKeyCount = 1;
+

Review Comment:
   delete space



-- 
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-unsubscr...@pegasus.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pegasus.apache.org
For additional commands, e-mail: dev-h...@pegasus.apache.org

Reply via email to