Browse Source

HADOOP-14690. RetryInvocationHandler should override toString(). Contributed by Yeliang Cang.

(cherry picked from commit f14be0d24126747887ddc7580f4a9a70768de23d)
Akira Ajisaka 7 years ago
parent
commit
9c8a296169

+ 11 - 0
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryInvocationHandler.java

@@ -295,6 +295,17 @@ public class RetryInvocationHandler<T> implements RpcInvocationHandler {
 
       return new RetryInfo(maxRetryDelay, max, expectedFailoverCount, ex);
     }
+
+    @Override
+    public String toString() {
+      return "RetryInfo{" +
+              "retryTime=" + retryTime +
+              ", delay=" + delay +
+              ", action=" + action +
+              ", expectedFailoverCount=" + expectedFailoverCount +
+              ", failException=" + failException +
+              '}';
+    }
   }
 
   private final ProxyDescriptor<T> proxyDescriptor;