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 2020/05/10 06:31:11 UTC
[hadoop] branch branch-3.1 updated: HDFS-15250. Setting
`dfs.client.use.datanode.hostname` to true can crash the system because of
unhandled UnresolvedAddressException. Contributed by Ctest.
This is an automated email from the ASF dual-hosted git repository.
ayushsaxena pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 86c15b8 HDFS-15250. Setting `dfs.client.use.datanode.hostname` to true can crash the system because of unhandled UnresolvedAddressException. Contributed by Ctest.
86c15b8 is described below
commit 86c15b8287462cfb21597a22882185bedabf72b1
Author: Ayush Saxena <ay...@apache.org>
AuthorDate: Sun May 10 11:43:04 2020 +0530
HDFS-15250. Setting `dfs.client.use.datanode.hostname` to true can crash the system because of unhandled UnresolvedAddressException. Contributed by Ctest.
---
.../java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java
index 0620f1d..b587aef 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java
@@ -27,6 +27,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.net.InetSocketAddress;
+import java.nio.channels.UnresolvedAddressException;
import java.util.List;
import com.google.common.io.ByteArrayDataOutput;
@@ -823,7 +824,7 @@ public class BlockReaderFactory implements ShortCircuitReplicaCreator {
datanode);
LOG.trace("nextTcpPeer: created newConnectedPeer {}", peer);
return new BlockReaderPeer(peer, false);
- } catch (IOException e) {
+ } catch (IOException | UnresolvedAddressException e) {
LOG.trace("nextTcpPeer: failed to create newConnectedPeer connected to"
+ "{}", datanode);
throw e;
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org