You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2012/04/12 20:35:53 UTC
svn commit: r1325430 -
/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
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;
+ }
}
}