Jim Halfpenny created HADOOP-19836:
--------------------------------------
Summary: Running dfsadmin report fails when datanode name fails to
resolve
Key: HADOOP-19836
URL: https://issues.apache.org/jira/browse/HADOOP-19836
Project: Hadoop Common
Issue Type: Bug
Components: hdfs
Affects Versions: 3.4.3
Reporter: Jim Halfpenny
When running `hdfs dfsadmin -report` on a cluster where one of the DataNode
addresses cannot be resolved, the DataNode report fails with an
IllegalArgumentException:
{{stackable@simple-hdfs-namenode-default-0 /stackable/hadoop-3.4.0 $ hdfs
dfsadmin -report}}
{{Configured Capacity: 2933688373248 (2.67 TB)}}
{{Present Capacity: 1299099013120 (1.18 TB)}}
{{DFS Remaining: 1299098914816 (1.18 TB)}}
{{DFS Used: 98304 (96 KB)}}
{{DFS Used%: 0.00%}}
{{Replicated Blocks:}}
{{ Under replicated blocks: 0}}
{{ Blocks with corrupt replicas: 0}}
{{ Missing blocks: 0}}
{{ Missing blocks (with replication factor 1): 0}}
{{ Low redundancy blocks with highest priority to recover: 0}}
{{ Pending deletion blocks: 0}}
{{Erasure Coded Block Groups:}}
{{ Low redundancy block groups: 0}}
{{ Block groups with corrupt internal blocks: 0}}
{{ Missing block groups: 0}}
{{ Low redundancy blocks with highest priority to recover: 0}}
{{ Pending deletion blocks: 0}}
{{-------------------------------------------------}}
{{report: java.lang.IllegalArgumentException}}
The method that adds DataNode addressed to the list of nodes to report on
checks to see if the hostname resolves. If this test fails then
Preconditions.checkArgument() throws an uncaught IllegalArgumentException.
{{ void add(InetSocketAddress addr) {}}
{{ Preconditions.checkArgument(!addr.isUnresolved());}}
{{ addrs.put(addr.getAddress(), addr.getPort());}}
{{ }}}
It would make more sense log the failure and return from the add() method
rather than cause the creation of the HostSet to fail entirely.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]