accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-3601 transfer migration information to the metadata table filtering iterator
Date Thu, 19 Feb 2015 20:51:39 GMT
ACCUMULO-3601 transfer migration information to the metadata table filtering iterator


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f6635fa3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f6635fa3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f6635fa3

Branch: refs/heads/master
Commit: f6635fa37d24f44702dee4bc0d0d2a4dd745db6f
Parents: c8a30df 4936b37
Author: Eric Newton <Eric Newton>
Authored: Thu Feb 19 15:40:41 2015 -0500
Committer: Eric Newton <Eric Newton>
Committed: Thu Feb 19 15:40:41 2015 -0500

----------------------------------------------------------------------
 .../server/master/state/CurrentState.java       |  3 +
 .../master/state/MetaDataTableScanner.java      |  1 +
 .../master/state/TabletStateChangeIterator.java | 40 +++++++++
 .../java/org/apache/accumulo/master/Master.java |  6 ++
 .../apache/accumulo/master/TestMergeState.java  |  5 ++
 .../org/apache/accumulo/test/BalanceIT.java     | 87 ++++++++++++++++++++
 .../functional/TabletStateChangeIteratorIT.java |  5 ++
 7 files changed, 147 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6635fa3/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6635fa3/server/base/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6635fa3/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --cc server/master/src/main/java/org/apache/accumulo/master/Master.java
index cc6a6ce,bc552bc..aaa68e5
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@@ -1480,55 -1326,8 +1480,61 @@@ public class Master extends AccumuloSer
      }
    }
  
++<<<<<<< HEAD
 +  public void waitForBalance(TInfo tinfo) {
 +    synchronized (balancedNotifier) {
 +      long eventCounter;
 +      do {
 +        eventCounter = nextEvent.waitForEvents(0, 0);
 +        try {
 +          balancedNotifier.wait();
 +        } catch (InterruptedException e) {
 +          log.debug(e.toString(), e);
 +        }
 +      } while (displayUnassigned() > 0 || migrations.size() > 0 || eventCounter !=
nextEvent.waitForEvents(0, 0));
 +    }
 +  }
 +
 +  public MasterMonitorInfo getMasterMonitorInfo() {
 +    final MasterMonitorInfo result = new MasterMonitorInfo();
 +
 +    result.tServerInfo = new ArrayList<TabletServerStatus>();
 +    result.tableMap = new DefaultMap<String,TableInfo>(new TableInfo());
 +    for (Entry<TServerInstance,TabletServerStatus> serverEntry : tserverStatus.entrySet())
{
 +      final TabletServerStatus status = serverEntry.getValue();
 +      result.tServerInfo.add(status);
 +      for (Entry<String,TableInfo> entry : status.tableMap.entrySet()) {
 +        TableInfoUtil.add(result.tableMap.get(entry.getKey()), entry.getValue());
 +      }
 +    }
 +    result.badTServers = new HashMap<String,Byte>();
 +    synchronized (badServers) {
 +      for (TServerInstance bad : badServers.keySet()) {
 +        result.badTServers.put(bad.hostPort(), TabletServerState.UNRESPONSIVE.getId());
 +      }
 +    }
 +    result.state = getMasterState();
 +    result.goalState = getMasterGoalState();
 +    result.unassignedTablets = displayUnassigned();
 +    result.serversShuttingDown = new HashSet<String>();
 +    synchronized (serversToShutdown) {
 +      for (TServerInstance server : serversToShutdown)
 +        result.serversShuttingDown.add(server.hostPort());
 +    }
 +    DeadServerList obit = new DeadServerList(ZooUtil.getRoot(getInstance()) + Constants.ZDEADTSERVERS);
 +    result.deadTabletServers = obit.getList();
 +    return result;
 +  }
 +
 +  /**
 +   * Can delegation tokens be generated for users
 +   */
 +  public boolean delegationTokensAvailable() {
 +    return delegationTokensAvailable;
 +  }
++
+   @Override
+   public Collection<KeyExtent> migrations() {
+     return migrations.keySet();
+   }
  }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6635fa3/server/master/src/test/java/org/apache/accumulo/master/TestMergeState.java
----------------------------------------------------------------------


Mime
View raw message