diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java index 83918c93735..efd742d2576 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java @@ -357,8 +357,8 @@ public class HBaseInterClusterReplicationEndpoint extends HBaseReplicationEndpoi } catch (InterruptedException ie) { iox = new IOException(ie); } catch (ExecutionException ee) { - // cause must be an IOException - iox = (IOException) ee.getCause(); + iox = ee.getCause() instanceof IOException? + (IOException)ee.getCause(): new IOException(ee.getCause()); } } if (iox != null) {