accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1325430 - /accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Date Thu, 12 Apr 2012 18:35:53 GMT
Author: ecn
Date: Thu Apr 12 18:35:53 2012
New Revision: 1325430

URL: http://svn.apache.org/viewvc?rev=1325430&view=rev
Log:
ACCUMULO-530 recycle connections after an i/o error

Modified:
    accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java

Modified: accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1325430&r1=1325429&r2=1325430&view=diff
==============================================================================
--- accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
(original)
+++ accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Thu Apr 12 18:35:53 2012
@@ -94,28 +94,58 @@ public class LiveTServerSet implements W
     }
     
     synchronized public void assignTablet(ZooLock lock, KeyExtent extent) throws TException
{
-      client.loadTablet(null, SecurityConstants.systemCredentials, lockString(lock), extent.toThrift());
+      try {
+        client.loadTablet(null, SecurityConstants.systemCredentials, lockString(lock), extent.toThrift());
+      } catch (TException ex) {
+        close();
+        throw ex;
+      }
     }
     
     synchronized public void unloadTablet(ZooLock lock, KeyExtent extent, boolean save) throws
TException {
-      client.unloadTablet(null, SecurityConstants.systemCredentials, lockString(lock), extent.toThrift(),
save);
+      try {
+        client.unloadTablet(null, SecurityConstants.systemCredentials, lockString(lock),
extent.toThrift(), save);
+      } catch (TException ex) {
+        close();
+        throw ex;
+      }
     }
     
     synchronized public TabletServerStatus getTableMap() throws TException, ThriftSecurityException
{
-      return client.getTabletServerStatus(null, SecurityConstants.systemCredentials);
+      try {
+        return client.getTabletServerStatus(null, SecurityConstants.systemCredentials);
+      } catch (TException ex) {
+        close();
+        throw ex;
+      }
     }
     
     synchronized public void halt(ZooLock lock) throws TException, ThriftSecurityException
{
-      if (client != null)
-        client.halt(null, SecurityConstants.systemCredentials, lockString(lock));
+      try {
+        if (client != null)
+          client.halt(null, SecurityConstants.systemCredentials, lockString(lock));
+      } catch (TException ex) {
+        close();
+        throw ex;
+      }
     }
     
     synchronized public void flush(ZooLock lock, String tableName) throws TException {
-      client.flush(null, SecurityConstants.systemCredentials, lockString(lock), Collections.singleton(tableName));
+      try {
+        client.flush(null, SecurityConstants.systemCredentials, lockString(lock), Collections.singleton(tableName));
+      } catch (TException ex) {
+        close();
+        throw ex;
+      }
     }
     
     synchronized public void useLoggers(Set<String> loggers) throws TException {
-      client.useLoggers(null, SecurityConstants.systemCredentials, loggers);
+      try {
+        client.useLoggers(null, SecurityConstants.systemCredentials, loggers);
+      } catch (TException ex) {
+        close();
+        throw ex;
+      }
     }
   }
   



Mime
View raw message