Package org.apache.accumulo.core.master.thrift

Examples of org.apache.accumulo.core.master.thrift.TabletServerStatus


   
    @Override
    public TabletServerStatus getTabletServerStatus(TInfo tinfo, TCredentials credentials) throws ThriftSecurityException, TException {
      synchronized (this) {
        if (statusCount++ < 1) {
          TabletServerStatus result = new TabletServerStatus();
          result.tableMap = new HashMap<String,TableInfo>();
          return result;
        }
      }
      UtilWaitThread.sleep(Integer.MAX_VALUE);
View Full Code Here


    majorCompactorThread.setName("Split/MajC initiator");
    majorCompactorThread.start();
  }
 
  public TabletServerStatus getStats(Map<String,MapCounter<ScanRunState>> scanCounts) {
    TabletServerStatus result = new TabletServerStatus();
   
    Map<KeyExtent,Tablet> onlineTabletsCopy;
    synchronized (this.onlineTablets) {
      onlineTabletsCopy = new HashMap<KeyExtent,Tablet>(this.onlineTablets);
    }
View Full Code Here

        try {
          t.setName("Getting status from " + server);
          TServerConnection connection = tserverSet.getConnection(server);
          if (connection == null)
            throw new IOException("No connection to " + server);
          TabletServerStatus status = connection.getTableMap(false);
          result.put(server, status);
        } finally {
          t.setName(oldName);
        }
      } catch (Exception ex) {
View Full Code Here

  static private TServerInstance mkts(String address, String session) throws Exception {
    return new TServerInstance(AddressUtil.parseAddress(address, 1234), session);
  }
 
  static private TabletServerStatus status(Object... config) {
    TabletServerStatus result = new TabletServerStatus();
    result.tableMap = new HashMap<String,TableInfo>();
    String tablename = null;
    for (Object c : config) {
      if (c instanceof String) {
        tablename = (String) c;
View Full Code Here

 
  static SortedMap<TServerInstance,TabletServerStatus> state;
 
  static List<TabletStats> generateFakeTablets(TServerInstance tserver, String tableId) {
    List<TabletStats> result = new ArrayList<TabletStats>();
    TabletServerStatus tableInfo = state.get(tserver);
    // generate some fake tablets
    for (int i = 0; i < tableInfo.tableMap.get(tableId).onlineTablets; i++) {
      TabletStats stats = new TabletStats();
      stats.extent = new KeyExtent(new Text(tableId), new Text(tserver.host() + String.format("%03d", i + 1)), new Text(tserver.host()
          + String.format("%03d", i))).toThrift();
View Full Code Here

    master.shutdownTServer(server);
    while (master.onlineTabletServers().contains(server)) {
      TServerConnection connection = master.getConnection(server);
      if (connection != null) {
        try {
          TabletServerStatus status = connection.getTableMap(false);
          if (status.tableMap != null && status.tableMap.isEmpty()) {
            log.info("tablet server hosts no tablets " + server);
            connection.halt(master.getMasterLock());
            log.info("tablet server asked to halt " + server);
            break;
View Full Code Here

      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()) {
          String table = entry.getKey();
          TableInfo summary = result.tableMap.get(table);
          Monitor.add(summary, entry.getValue());
View Full Code Here

 
  class FakeTServer {
    List<KeyExtent> extents = new ArrayList<KeyExtent>();
   
    TabletServerStatus getStatus(TServerInstance server) {
      TabletServerStatus result = new TabletServerStatus();
      result.tableMap = new HashMap<String,TableInfo>();
      for (KeyExtent extent : extents) {
        String table = extent.getTableId().toString();
        TableInfo info = result.tableMap.get(table);
        if (info == null)
View Full Code Here

  static private TServerInstance mkts(String address, String session) throws Exception {
    return new TServerInstance(AddressUtil.parseAddress(address, 1234), session);
  }
 
  static private TabletServerStatus status(Object... config) {
    TabletServerStatus result = new TabletServerStatus();
    result.tableMap = new HashMap<String,TableInfo>();
    String tablename = null;
    for (Object c : config) {
      if (c instanceof String) {
        tablename = (String) c;
View Full Code Here

 
  static SortedMap<TServerInstance,TabletServerStatus> state;
 
  static List<TabletStats> generateFakeTablets(TServerInstance tserver, String tableId) {
    List<TabletStats> result = new ArrayList<TabletStats>();
    TabletServerStatus tableInfo = state.get(tserver);
    // generate some fake tablets
    for (int i = 0; i < tableInfo.tableMap.get(tableId).onlineTablets; i++) {
      TabletStats stats = new TabletStats();
      stats.extent = new KeyExtent(new Text(tableId), new Text(tserver.host() + String.format("%03d", i + 1)), new Text(tserver.host()
          + String.format("%03d", i))).toThrift();
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.master.thrift.TabletServerStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.