hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r936105 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/0.20.iml src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
Date Tue, 20 Apr 2010 23:01:12 GMT
Author: stack
Date: Tue Apr 20 23:01:12 2010
New Revision: 936105

URL: http://svn.apache.org/viewvc?rev=936105&view=rev
Log:
HBASE-2443 IPC client can throw NPE if socket creation fails

Added:
    hadoop/hbase/branches/0.20/src/0.20.iml
Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=936105&r1=936104&r2=936105&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Tue Apr 20 23:01:12 2010
@@ -89,6 +89,8 @@ Release 0.20.4 - Unreleased
    HBASE-2457  RS gets stuck compacting region ad infinitum
    HBASE-2448  Scanner threads are interrupted without acquiring lock properly
                (Todd Lipcon via Stack)
+   HBASE-2443  IPC client can throw NPE if socket creation fails
+               (Todd Lipcon via Stack)
 
   IMPROVEMENTS
    HBASE-2180  Bad read performance from synchronizing hfile.fddatainputstream

Added: hadoop/hbase/branches/0.20/src/0.20.iml
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/0.20.iml?rev=936105&view=auto
==============================================================================
--- hadoop/hbase/branches/0.20/src/0.20.iml (added)
+++ hadoop/hbase/branches/0.20/src/0.20.iml Tue Apr 20 23:01:12 2010
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/examples" isTestSource="false" packagePrefix="org.apache.hadoop.hbase"
/>
+      <sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="lib" level="project" />
+    <orderEntry type="library" name="lib2" level="project" />
+  </component>
+</module>
+

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java?rev=936105&r1=936104&r2=936105&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Tue Apr
20 23:01:12 2010
@@ -350,10 +350,12 @@ public class HBaseClient {
     private void handleConnectionFailure(
         int curRetries, int maxRetries, IOException ioe) throws IOException {
       // close the current connection
-      try {
-        socket.close();
-      } catch (IOException e) {
-        LOG.warn("Not able to close a socket", e);
+      if (socket != null) { // could be null if the socket creation failed
+        try {
+          socket.close();
+        } catch (IOException e) {
+          LOG.warn("Not able to close a socket", e);
+        }
       }
       // set socket to null so that the next call to setupIOstreams
       // can start the process of connect all over again.



Mime
View raw message