Author: hairong
Date: Tue Mar 17 18:52:25 2009
New Revision: 755348
URL: http://svn.apache.org/viewvc?rev=755348&view=rev
Log:
HADOOP-5463. Balancer throws "Not a host:port pair" unless port is specified in
fs.default.name. Contributed by Stuart White.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=755348&r1=755347&r2=755348&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Mar 17 18:52:25 2009
@@ -1019,6 +1019,9 @@
HADOOP-5281. Prevent sharing incompatible ZlibCompressor instances between
GzipCodec and DefaultCodec. (cdouglas)
+ HADOOP-5463. Balancer throws "Not a host:port pair" unless port is
+ specified in fs.default.name. (Stuart White via hairong)
+
Release 0.19.2 - Unreleased
BUG FIXES
Modified:
hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java?rev=755348&r1=755347&r2=755348&view=diff
==============================================================================
---
hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java
(original)
+++
hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Tue Mar 17 18:52:25 2009
@@ -56,6 +56,7 @@
import org.apache.hadoop.hdfs.protocol.*;
import org.apache.hadoop.hdfs.protocol.FSConstants.DatanodeReportType;
import org.apache.hadoop.hdfs.server.datanode.DataNode;
+import org.apache.hadoop.hdfs.server.namenode.NameNode;
import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
import
org.apache.hadoop.hdfs.server.protocol.BlocksWithLocations.BlockWithLocations;
import org.apache.hadoop.fs.FileSystem;
@@ -846,8 +847,7 @@
* set up the retry policy */
private static NamenodeProtocol createNamenode(Configuration conf)
throws IOException {
- InetSocketAddress nameNodeAddr =
- DataNode.createSocketAddr(FileSystem.getDefaultUri(conf).getAuthority());
+ InetSocketAddress nameNodeAddr = NameNode.getAddress(conf);
RetryPolicy timeoutPolicy = RetryPolicies.exponentialBackoffRetry(
5, 200, TimeUnit.MILLISECONDS);
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap =