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

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


import org.apache.accumulo.server.security.SecurityConstants;

public class GetMasterStats {
  public static void main(String[] args) throws Exception {
    MasterClientService.Iface client = null;
    MasterMonitorInfo stats = null;
    try {
      client = MasterClient.getConnectionWithRetry(HdfsZooInstance.getInstance());
      stats = client.getMasterStats(Tracer.traceInfo(), SecurityConstants.getSystemCredentials());
    } finally {
      if (client != null)
View Full Code Here


 
  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

      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

     
    }
   
    @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

     
    }
   
    @Override
    public MasterMonitorInfo getMasterStats(TInfo info, AuthInfo credentials) throws ThriftSecurityException, TException {
      final MasterMonitorInfo result = new MasterMonitorInfo();
      result.loggers = new ArrayList<LoggerStatus>();
      for (String logger : loggers.getLoggersFromZooKeeper().values()) {
        result.loggers.add(new LoggerStatus(logger));
      }
      result.recovery = recovery.status();
View Full Code Here

 
  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

   * @throws IOException
   * @throws TTransportException
   */
  public static void main(String[] args) throws Exception {
    MasterClientService.Iface client = null;
    MasterMonitorInfo stats = null;
    try {
      client = MasterClient.getConnectionWithRetry(HdfsZooInstance.getInstance());
      stats = client.getMasterStats(Tracer.traceInfo(), SecurityConstants.getSystemCredentials());
    } finally {
      if (client != null)
View Full Code Here

     
    }
   
    @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

      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

    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

TOP

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

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.