Search in sources :

Example 1 with ServerShuttingDownInformation

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

the class ManagerResource method getServersShuttingDown.

/**
 * Generates a JSON object of a list of servers shutting down
 *
 * @return servers shutting down list
 */
public static ServersShuttingDown getServersShuttingDown(Monitor monitor) {
    ManagerMonitorInfo mmi = monitor.getMmi();
    ServersShuttingDown servers = new ServersShuttingDown();
    if (mmi == null)
        return servers;
    // Add new servers to the list
    for (String server : mmi.serversShuttingDown) {
        servers.addServerShuttingDown(new ServerShuttingDownInformation(server));
    }
    return servers;
}
Also used : ServerShuttingDownInformation(org.apache.accumulo.monitor.rest.tservers.ServerShuttingDownInformation) ManagerMonitorInfo(org.apache.accumulo.core.manager.thrift.ManagerMonitorInfo) ServersShuttingDown(org.apache.accumulo.monitor.rest.tservers.ServersShuttingDown)

Aggregations

ManagerMonitorInfo (org.apache.accumulo.core.manager.thrift.ManagerMonitorInfo)1 ServerShuttingDownInformation (org.apache.accumulo.monitor.rest.tservers.ServerShuttingDownInformation)1 ServersShuttingDown (org.apache.accumulo.monitor.rest.tservers.ServersShuttingDown)1