[ https://issues.apache.org/jira/browse/HDFS-9100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14908445#comment-14908445 ]
Yongjun Zhang commented on HDFS-9100: ------------------------------------- Hi [~caseyjbrotherton], Thanks for the patch and the cluster testing. The patch looks good to me, two very minor cosmetic comments: 1. Change order of the following two lines: {code} import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys; import org.apache.hadoop.hdfs.DistributedFileSystem; {code} 2. When a line is wrapped, the indention of the newline need to be 4 spaces per the coding guideline, like: {code} NetUtils.createSocketAddr(target.getDatanodeInfo(). getXferAddr(Dispatcher.this.connectToDnViaHostname)), HdfsConstants.READ_TIMEOUT); {code} Thanks. > HDFS Balancer does not respect dfs.client.use.datanode.hostname > --------------------------------------------------------------- > > Key: HDFS-9100 > URL: https://issues.apache.org/jira/browse/HDFS-9100 > Project: Hadoop HDFS > Issue Type: Bug > Components: balancer & mover, HDFS > Reporter: Yongjun Zhang > Assignee: Casey Brotherton > Attachments: HDFS-9100.000.patch, HDFS-9100.001.patch > > > In Balancer Dispatch.java: > {code} > private void dispatch() { > LOG.info("Start moving " + this); > Socket sock = new Socket(); > DataOutputStream out = null; > DataInputStream in = null; > try { > sock.connect( > NetUtils.createSocketAddr(target.getDatanodeInfo().getXferAddr()), > HdfsConstants.READ_TIMEOUT); > {code} > getXferAddr() is called without taking into consideration of > dfs.client.use.datanode.hostname setting, this would possibly fail balancer > run issued from outside a cluster. > Thanks [~caseyjbrotherton] for reporting the issue. -- This message was sent by Atlassian JIRA (v6.3.4#6332)