Search in sources :

Example 1 with DeadServerList

use of org.apache.accumulo.monitor.rest.tservers.DeadServerList in project accumulo by apache.

the class MasterResource method getDeadTservers.

/**
 * Generates a dead server list as a JSON object
 *
 * @return dead server list
 */
public static DeadServerList getDeadTservers() {
    MasterMonitorInfo mmi = getMmi();
    if (null == mmi) {
        return new DeadServerList();
    }
    DeadServerList deadServers = new DeadServerList();
    // Add new dead servers to the list
    for (DeadServer dead : mmi.deadTabletServers) {
        deadServers.addDeadServer(new DeadServerInformation(dead.server, dead.lastStatus, dead.status));
    }
    return deadServers;
}
Also used : MasterMonitorInfo(org.apache.accumulo.core.master.thrift.MasterMonitorInfo) DeadServerInformation(org.apache.accumulo.monitor.rest.tservers.DeadServerInformation) DeadServerList(org.apache.accumulo.monitor.rest.tservers.DeadServerList) 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 DeadServerInformation (org.apache.accumulo.monitor.rest.tservers.DeadServerInformation)1 DeadServerList (org.apache.accumulo.monitor.rest.tservers.DeadServerList)1