Search in sources :

Example 6 with DeadServer

use of org.apache.accumulo.core.master.thrift.DeadServer in project accumulo by apache.

the class MasterResource method getDeadLoggers.

/**
 * Generates a dead logger list as a JSON object
 *
 * @return dead logger list
 */
public static DeadLoggerList getDeadLoggers() {
    MasterMonitorInfo mmi = getMmi();
    if (null == mmi) {
        return new DeadLoggerList();
    }
    DeadLoggerList deadLoggers = new DeadLoggerList();
    // Add new dead loggers to the list
    for (DeadServer dead : mmi.deadTabletServers) {
        deadLoggers.addDeadLogger(new DeadLoggerInformation(dead.server, dead.lastStatus, dead.status));
    }
    return deadLoggers;
}
Also used : MasterMonitorInfo(org.apache.accumulo.core.master.thrift.MasterMonitorInfo) DeadLoggerList(org.apache.accumulo.monitor.rest.logs.DeadLoggerList) DeadLoggerInformation(org.apache.accumulo.monitor.rest.logs.DeadLoggerInformation) DeadServer(org.apache.accumulo.core.master.thrift.DeadServer)

Aggregations

DeadServer (org.apache.accumulo.core.master.thrift.DeadServer)6 MasterMonitorInfo (org.apache.accumulo.core.master.thrift.MasterMonitorInfo)4 ArrayList (java.util.ArrayList)3 TabletServerStatus (org.apache.accumulo.core.master.thrift.TabletServerStatus)3 GET (javax.ws.rs.GET)2 SimpleDateFormat (java.text.SimpleDateFormat)1 Date (java.util.Date)1 Instance (org.apache.accumulo.core.client.Instance)1 ThriftNotActiveServiceException (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException)1 GCStatus (org.apache.accumulo.core.gc.thrift.GCStatus)1 BulkImportStatus (org.apache.accumulo.core.master.thrift.BulkImportStatus)1 MasterClientService (org.apache.accumulo.core.master.thrift.MasterClientService)1 RecoveryStatus (org.apache.accumulo.core.master.thrift.RecoveryStatus)1 TableInfo (org.apache.accumulo.core.master.thrift.TableInfo)1 IZooReaderWriter (org.apache.accumulo.fate.zookeeper.IZooReaderWriter)1 DeadLoggerInformation (org.apache.accumulo.monitor.rest.logs.DeadLoggerInformation)1 DeadLoggerList (org.apache.accumulo.monitor.rest.logs.DeadLoggerList)1 DeadServerInformation (org.apache.accumulo.monitor.rest.tservers.DeadServerInformation)1 DeadServerList (org.apache.accumulo.monitor.rest.tservers.DeadServerList)1 AccumuloServerContext (org.apache.accumulo.server.AccumuloServerContext)1