Examples of MasterMonitorInfo


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

     
    }
   
    @Override
    public MasterMonitorInfo getMasterStats(TInfo info, TCredentials credentials) throws ThriftSecurityException, TException {
      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();
View Full Code Here

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

      badTServerList.generate(req, sb);
    }
  }
 
  private void doDeadTserverList(HttpServletRequest req, StringBuilder sb) {
    MasterMonitorInfo mmi = Monitor.getMmi();
    if (mmi != null) {
      List<DeadServer> obit = mmi.deadTabletServers;
      Table deadTServerList = new Table("deaddtservers", "Dead&nbsp;Tablet&nbsp;Servers", "error");
      deadTServerList.setSubCaption("The following tablet servers are no longer reachable.");
      doDeadServerTable(req, sb, deadTServerList, obit);
View Full Code Here

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

    Process exec = Runtime.getRuntime().exec(new String[]{System.getenv().get("ACCUMULO_HOME") + "/bin/start-all.sh"});
    exec.waitFor();
    while (true) {
      try {
        Client client = MasterClient.getConnection(HdfsZooInstance.getInstance());
        MasterMonitorInfo masterStats = client.getMasterStats(Tracer.traceInfo(), SecurityConstants.getSystemCredentials());
        if (!masterStats.tServerInfo.isEmpty())
          break;
      } catch (Exception ex) {
        UtilWaitThread.sleep(1000);
      }
View Full Code Here

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

 
  private void doAccumuloTable(StringBuilder sb) throws IOException {
    // Accumulo
    Configuration conf = CachedConfiguration.getInstance();
    FileSystem fs = TraceFileSystem.wrap(FileUtil.getFileSystem(conf, ServerConfiguration.getSiteConfiguration()));
    MasterMonitorInfo info = Monitor.getMmi();
    sb.append("<table>\n");
    sb.append("<tr><th colspan='2'><a href='/master'>Accumulo Master</a></th></tr>\n");
    if (info == null) {
      sb.append("<tr><td colspan='2'><span class='error'>Master is Down</span></td></tr>\n");
    } else {
View Full Code Here

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

      banner(sb, "error", "Master Server Not Running");
   
  }
 
  private void doRecoveryList(HttpServletRequest req, StringBuilder sb) {
    MasterMonitorInfo mmi = Monitor.getMmi();
    if (mmi != null) {
      Table recoveryTable = new Table("logRecovery", "Log&nbsp;Recovery");
      recoveryTable.setSubCaption("Some tablets were unloaded in an unsafe manner. Write-ahead logs are being recovered.");
      recoveryTable.addSortableColumn("Server");
      recoveryTable.addSortableColumn("Log");
View Full Code Here

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

    private String getACUStats() throws Exception {
     
      MasterClientService.Iface client = null;
      try {
        client = MasterClient.getConnectionWithRetry(opts.getInstance());
        MasterMonitorInfo stats = client.getMasterStats(Tracer.traceInfo(), SecurityConstants.getSystemCredentials());
       
        TableInfo all = new TableInfo();
        Map<String,TableInfo> tableSummaries = new HashMap<String,TableInfo>();
       
        for (TabletServerStatus server : stats.tServerInfo) {
View Full Code Here

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

  }

  private void checkBalance(Connector c) throws Exception {
    Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD));

    MasterMonitorInfo stats = null;
    int unassignedTablets = 1;
    for (int i = 0; unassignedTablets > 0 && i < 10; i++) {
      MasterClientService.Iface client = null;
      try {
        client = MasterClient.getConnectionWithRetry(c.getInstance());
        stats = client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance()));
      } finally {
        if (client != null)
          MasterClient.close(client);
      }
      unassignedTablets = stats.getUnassignedTablets();
      if (unassignedTablets > 0) {
        log.info("Found " + unassignedTablets + " unassigned tablets, sleeping 3 seconds for tablet assignment");
        Thread.sleep(3000);
      }
    }
View Full Code Here

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

    TestIngest.ingest(c, opts, new BatchWriterOpts());
    c.tableOperations().flush("test_ingest", null, null, false);
    UtilWaitThread.sleep(45 * 1000);
    Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD));

    MasterMonitorInfo stats = null;
    int unassignedTablets = 1;
    for (int i = 0; unassignedTablets > 0 && i < 10; i++) {
      MasterClientService.Iface client = null;
      try {
        client = MasterClient.getConnectionWithRetry(c.getInstance());
        stats = client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance()));
      } finally {
        if (client != null)
          MasterClient.close(client);
      }
      unassignedTablets = stats.getUnassignedTablets();
      if (unassignedTablets > 0) {
        log.info("Found " + unassignedTablets + " unassigned tablets, sleeping 3 seconds for tablet assignment");
        Thread.sleep(3000);
      }
    }
View Full Code Here

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

    while (!balancingWorked && (System.currentTimeMillis() - startTime) < ((5*60 + 15)*1000)) {
      Thread.sleep(currentWait);
      currentWait *= 2;

      log.debug("fetch the list of tablets assigned to each tserver.");
      MasterMonitorInfo stats = getCluster().getMasterMonitorInfo();

      if (stats.getTServerInfoSize() < 2) {
        log.debug("we need >= 2 servers. sleeping for " + currentWait + "ms");
        continue;
      }
      if (stats.getUnassignedTablets() != 0) {
        log.debug("We shouldn't have unassigned tablets. sleeping for " + currentWait + "ms");
        continue;
      }

      long[] tabletsPerServer = new long[stats.getTServerInfoSize()];
      Arrays.fill(tabletsPerServer, 0l);
      for (int i = 0; i < stats.getTServerInfoSize(); i++) {
        for (Map.Entry<String, TableInfo> entry : stats.getTServerInfo().get(i).getTableMap().entrySet()) {
          tabletsPerServer[i] += entry.getValue().getTablets();
        }
      }

      if (tabletsPerServer[0] <= 10) {
View Full Code Here

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

      badTServerList.generate(req, sb);
    }
  }
 
  private void doDeadTserverList(HttpServletRequest req, StringBuilder sb) {
    MasterMonitorInfo mmi = Monitor.getMmi();
    if (mmi != null) {
      List<DeadServer> obit = mmi.deadTabletServers;
      Table deadTServerList = new Table("deaddtservers", "Dead&nbsp;Tablet&nbsp;Servers", "error");
      deadTServerList.setSubCaption("The following tablet servers are no longer reachable.");
      doDeadServerTable(req, sb, deadTServerList, obit);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.