You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ay...@apache.org on 2019/12/29 07:44:50 UTC
[hadoop] branch trunk updated: HDFS-14937. [SBN read]
ObserverReadProxyProvider should throw InterruptException. Contributed by
xuzq.
This is an automated email from the ASF dual-hosted git repository.
ayushsaxena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6242391 HDFS-14937. [SBN read] ObserverReadProxyProvider should throw InterruptException. Contributed by xuzq.
6242391 is described below
commit 62423910a4020bea6200c44c12fe96b6e14bd59c
Author: Ayush Saxena <ay...@apache.org>
AuthorDate: Sun Dec 29 13:07:22 2019 +0530
HDFS-14937. [SBN read] ObserverReadProxyProvider should throw InterruptException. Contributed by xuzq.
---
.../hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
index 67c34fe..e3753c3 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.hdfs.server.namenode.ha;
import java.io.Closeable;
import java.io.IOException;
+import java.io.InterruptedIOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
@@ -412,6 +413,13 @@ public class ObserverReadProxyProvider<T>
throw ite.getCause();
}
Exception e = (Exception) ite.getCause();
+ if (e instanceof InterruptedIOException ||
+ e instanceof InterruptedException) {
+ // If interrupted, do not retry.
+ LOG.warn("Invocation returned interrupted exception on [{}];",
+ current.proxyInfo, e);
+ throw e;
+ }
if (e instanceof RemoteException) {
RemoteException re = (RemoteException) e;
Exception unwrapped = re.unwrapRemoteException(
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org