hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r449856 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/ipc/Client.java
Date Mon, 25 Sep 2006 23:22:29 GMT
Author: cutting
Date: Mon Sep 25 16:22:28 2006
New Revision: 449856

URL: http://svn.apache.org/viewvc?view=rev&rev=449856
Log:
HADOOP-487.  Throw a more informative exception for unknown RPC hosts.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Client.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=449856&r1=449855&r2=449856
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Sep 25 16:22:28 2006
@@ -73,6 +73,9 @@
     build/, no longer modifying the source tree.
     (Arun C Murthy via cutting)
 
+19. HADOOP-487.  Throw a more informative exception for unknown RPC
+    hosts.  (Sameer Paranjpye via cutting)
+
 
 Release 0.6.2 (unreleased)
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Client.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Client.java?view=diff&rev=449856&r1=449855&r2=449856
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Client.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Client.java Mon Sep 25 16:22:28 2006
@@ -19,6 +19,7 @@
 import java.net.Socket;
 import java.net.InetSocketAddress;
 import java.net.SocketTimeoutException;
+import java.net.UnknownHostException;
 
 import java.io.IOException;
 import java.io.EOFException;
@@ -117,10 +118,11 @@
     private boolean shouldCloseConnection = false;
 
     public Connection(InetSocketAddress address) throws IOException {
+      if (address.isUnresolved()) {
+         throw new UnknownHostException("unknown host: " + address.getHostName());
+      }
       this.address = address;
-      this.setName("Client connection to "
-                   + address.getAddress().getHostAddress()
-                   + ":" + address.getPort());
+      this.setName("Client connection to " + address.toString());
       this.setDaemon(true);
     }
 



Mime
View raw message