use of org.apache.accumulo.monitor.Monitor.ScanStats in project accumulo by apache.
the class ScansResource method getTables.
/**
* Generates a new JSON object with scan information
*
* @return Scan JSON object
*/
@GET
public Scans getTables() {
Scans scans = new Scans();
Map<HostAndPort, ScanStats> entry = Monitor.getScans();
// Adds new scans to the array
for (TabletServerStatus tserverInfo : Monitor.getMmi().getTServerInfo()) {
ScanStats stats = entry.get(HostAndPort.fromString(tserverInfo.name));
if (stats != null) {
scans.addScan(new ScanInformation(tserverInfo, stats.scanCount, stats.oldestScan));
}
}
return scans;
}
Aggregations