Search in sources :

Example 1 with DeadLoggerInformation

use of org.apache.accumulo.monitor.rest.logs.DeadLoggerInformation 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)1 MasterMonitorInfo (org.apache.accumulo.core.master.thrift.MasterMonitorInfo)1 DeadLoggerInformation (org.apache.accumulo.monitor.rest.logs.DeadLoggerInformation)1 DeadLoggerList (org.apache.accumulo.monitor.rest.logs.DeadLoggerList)1