taklwu commented on a change in pull request #3696:
URL: https://github.com/apache/hbase/pull/3696#discussion_r714578155



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java
##########
@@ -462,24 +461,30 @@ public Admin getAdmin() throws IOException {
 
   @Override
   public Hbck getHbck() throws IOException {
-    return getHbck(get(registry.getActiveMaster()));
+    ServerName masterServer = get(registry.getActiveMaster());

Review comment:
       mmm, let me give a try to move it back.
   
   the reason was, I don't find a good way to have this future type to get 
masterServer that trace with a non-future block below this line, and thought 
the masterServer need to be reused as part of the `setAttribute`. 

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
##########
@@ -393,45 +396,53 @@ protected Result rpcCall() throws Exception {
 
   @Override
   public Result[] get(List<Get> gets) throws IOException {
-    if (gets.size() == 1) {
-      return new Result[]{get(gets.get(0))};
-    }
-    try {
-      Object[] r1 = new Object[gets.size()];
-      batch((List<? extends Row>)gets, r1, readRpcTimeoutMs);
-      // Translate.
-      Result [] results = new Result[r1.length];
-      int i = 0;
-      for (Object obj: r1) {
-        // Batch ensures if there is a failure we get an exception instead
-        results[i++] = (Result)obj;
+    return TraceUtil.trace(() -> {

Review comment:
       we're using the existing `public static <T> T 
trace(IOExceptionCallable<T> callable, Supplier<Span> creator)` for here, 
   
   I added the `traceWithIOException` for `void` function that does not come 
with throwing `IOException`. 
   
   I didn't change the method name of `public static <T> T 
trace(IOExceptionCallable<T> callable, Supplier<Span> creator)` to avoid 
conflict and difference from master branch. 




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