hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r654256 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/ipc/HbaseRPC.java
Date Wed, 07 May 2008 20:19:54 GMT
Author: jimk
Date: Wed May  7 13:19:53 2008
New Revision: 654256

URL: http://svn.apache.org/viewvc?rev=654256&view=rev
Log:
HBASE-453   undeclared throwable exception from HTable.get

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ipc/HbaseRPC.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=654256&r1=654255&r2=654256&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Wed May  7 13:19:53 2008
@@ -34,6 +34,7 @@
    HBASE-618   We always compact if 2 files, regardless of the compaction threshold setting
    HBASE-619   Fix 'logs' link in UI
    HBASE-478   offlining of table does not run reliably
+   HBASE-453   undeclared throwable exception from HTable.get
 
   IMPROVEMENTS
    HBASE-559   MR example job to count table rows

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ipc/HbaseRPC.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ipc/HbaseRPC.java?rev=654256&r1=654255&r2=654256&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ipc/HbaseRPC.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/ipc/HbaseRPC.java Wed May  7 13:19:53
2008
@@ -205,13 +205,24 @@
     }
 
     public Object invoke(Object proxy, Method method, Object[] args)
-      throws Throwable {
+      throws IOException {
       long startTime = System.currentTimeMillis();
-      HbaseObjectWritable value = (HbaseObjectWritable)
-        client.call(new Invocation(method, args), address, ticket);
-      long callTime = System.currentTimeMillis() - startTime;
-      LOG.debug("Call: " + method.getName() + " " + callTime);
-      return value.get();
+      try {
+        HbaseObjectWritable value = (HbaseObjectWritable)
+          client.call(new Invocation(method, args), address, ticket);
+        long callTime = System.currentTimeMillis() - startTime;
+        LOG.debug("Call: " + method.getName() + " " + callTime);
+        return value.get();
+      } catch (Throwable t) {
+        IOException e;
+        if (t instanceof IOException) {
+          e = (IOException) t;
+        } else {
+          e = new IOException("error during RPC call");
+          e.initCause(t);
+        }
+        throw e;
+      }
     }
   }
 



Mime
View raw message