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 2013/02/26 21:40:58 UTC
svn commit: r1450398 - in /accumulo/trunk: ./ assemble/ core/ examples/
fate/src/main/java/org/apache/accumulo/fate/
fate/src/main/java/org/apache/accumulo/fate/zookeeper/ server/
server/src/main/java/org/apache/accumulo/server/master/ src/
Author: ecn
Date: Tue Feb 26 20:40:58 2013
New Revision: 1450398
URL: http://svn.apache.org/r1450398
Log:
ACCUMULO-1112 allow the master to transition from UNLOAD_METADATA_TABLE to NORMAL
Modified:
accumulo/trunk/ (props changed)
accumulo/trunk/assemble/ (props changed)
accumulo/trunk/core/ (props changed)
accumulo/trunk/examples/ (props changed)
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java (props changed)
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java (props changed)
accumulo/trunk/server/ (props changed)
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
accumulo/trunk/src/ (props changed)
Propchange: accumulo/trunk/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5:r1450397
Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/assemble:r1450397
Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/core:r1450397
Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/examples:r1450397
Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1450397
Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1450397
Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/server:r1450397
Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1450398&r1=1450397&r2=1450398&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java Tue Feb 26 20:40:58 2013
@@ -78,9 +78,10 @@ import org.apache.accumulo.core.master.t
import org.apache.accumulo.core.master.thrift.TabletServerStatus;
import org.apache.accumulo.core.master.thrift.TabletSplit;
import org.apache.accumulo.core.security.SecurityUtil;
-import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
import org.apache.accumulo.core.security.thrift.Credential;
+import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
+import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
import org.apache.accumulo.core.util.ByteBufferUtil;
import org.apache.accumulo.core.util.CachedConfiguration;
import org.apache.accumulo.core.util.Daemon;
@@ -233,7 +234,7 @@ public class Master implements LiveTServ
/* SAFE_MODE */ {_, _, X, X, X, _, X},
/* NORMAL */ {_, _, X, X, X, _, X},
/* UNLOAD_METADATA_TABLETS */ {_, _, X, X, X, X, X},
- /* UNLOAD_ROOT_TABLET */ {_, _, _, _, _, X, X},
+ /* UNLOAD_ROOT_TABLET */ {_, _, _, X, _, X, X},
/* STOP */ {_, _, _, _, _, _, X}
};
@@ -710,7 +711,8 @@ public class Master implements LiveTServ
@Override
public void reportSplitExtent(TInfo info, Credential credentials, String serverName, TabletSplit split) throws TException {
- if (migrations.remove(new KeyExtent(split.oldTablet)) != null) {
+ KeyExtent oldTablet = new KeyExtent(split.oldTablet);
+ if (migrations.remove(oldTablet) != null) {
log.info("Canceled migration of " + split.oldTablet);
}
for (TServerInstance instance : tserverSet.getCurrentServers()) {
@@ -722,6 +724,7 @@ public class Master implements LiveTServ
log.warn("Got a split from a server we don't recognize: " + serverName);
}
+
@Override
public void reportTabletStatus(TInfo info, Credential credentials, String serverName, TabletLoadState status, TKeyExtent ttablet) throws TException {
KeyExtent tablet = new KeyExtent(ttablet);
@@ -1469,6 +1472,8 @@ public class Master implements LiveTServ
} else {
log.warn("Not connected to server " + tls.current);
}
+ } catch (NotServingTabletException e) {
+ log.debug("Error asking tablet server to split a tablet: " + e);
} catch (Exception e) {
log.warn("Error asking tablet server to split a tablet: " + e);
}
@@ -1858,13 +1863,7 @@ public class Master implements LiveTServ
try {
switch (getMasterGoalState()) {
case NORMAL:
- switch (getMasterState()) {
- case HAVE_LOCK:
- case SAFE_MODE:
- setMasterState(MasterState.NORMAL);
- default:
- break;
- }
+ setMasterState(MasterState.NORMAL);
break;
case SAFE_MODE:
if (getMasterState() == MasterState.NORMAL) {
@@ -2002,7 +2001,10 @@ public class Master implements LiveTServ
String oldName = t.getName();
try {
t.setName("Getting status from " + server);
- TabletServerStatus status = tserverSet.getConnection(server).getTableMap();
+ TServerConnection connection = tserverSet.getConnection(server);
+ if (connection == null)
+ throw new IOException("No connection to " + server);
+ TabletServerStatus status = connection.getTableMap();
// TODO maybe remove from bad servers
result.put(server, status);
} finally {
Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/src:r1450397