Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions server/monitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-start</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,18 @@ public MetricResponse getManager() {
return monitor.getInformationFetcher().getAllMetrics().asMap().get(s);
}

@GET
Comment thread
kevinrr888 marked this conversation as resolved.
@Path("manager/metrics")
@Produces(MediaType.APPLICATION_JSON)
@Description("Returns the metrics for the Manager")
public List<FMetric> getManagerMetrics() {
var managerMetrics = getManager().getMetrics();
if (managerMetrics != null) {
return managerMetrics.stream().map(FMetric::getRootAsFMetric).collect(Collectors.toList());
}
return List.of();
}

@GET
@Path("gc")
@Produces(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@

import jakarta.xml.bind.annotation.XmlRootElement;

import org.apache.accumulo.monitor.rest.logs.DeadLoggerList;
import org.apache.accumulo.monitor.rest.manager.ManagerInformation;
import org.apache.accumulo.monitor.rest.tables.TableInformationList;
import org.apache.accumulo.monitor.rest.tservers.BadTabletServers;
import org.apache.accumulo.monitor.rest.tservers.DeadServerList;
import org.apache.accumulo.monitor.rest.tservers.ServersShuttingDown;
import org.apache.accumulo.monitor.rest.tservers.TabletServer;

/**
Expand All @@ -40,46 +35,23 @@
public class SummaryInformation {
Comment thread
kevinrr888 marked this conversation as resolved.

// Variable names become JSON keys
public List<TabletServer> servers = new ArrayList<>();

public String managerGoalState;
public String managerState;

public BadTabletServers badTabletServers;
public ServersShuttingDown tabletServersShuttingDown;
public Integer unassignedTablets;
public DeadServerList deadTabletServers;

public DeadLoggerList deadLoggers;
public List<TabletServer> servers;

public TableInformationList tables;

public Totals totals;

// do not remove
public SummaryInformation() {}

/**
* Stores Monitor information as XML or JSON
*
* @param size Number of tservers
* @param info Manager information
* @param tablesList Table list
*/
public SummaryInformation(int size, ManagerInformation info, TableInformationList tablesList) {
public SummaryInformation(int size, TableInformationList tablesList) {
this.servers = new ArrayList<>(size);

this.managerGoalState = info.managerGoalState;
this.managerState = info.managerState;

this.badTabletServers = info.badTabletServers;
this.tabletServersShuttingDown = info.tabletServersShuttingDown;
this.unassignedTablets = info.unassignedTablets;
this.deadTabletServers = info.deadTabletServers;
this.deadLoggers = info.deadLoggers;

this.tables = tablesList;

this.totals = new Totals(info.ingestrate, info.queryrate, info.numentries);
}

/**
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.apache.accumulo.core.manager.thrift.ManagerMonitorInfo;
import org.apache.accumulo.core.manager.thrift.TabletServerStatus;
import org.apache.accumulo.monitor.Monitor;
import org.apache.accumulo.monitor.rest.manager.ManagerResource;
import org.apache.accumulo.monitor.rest.tables.TablesResource;
import org.apache.accumulo.monitor.rest.tservers.TabletServer;

Expand Down Expand Up @@ -58,8 +57,8 @@ public SummaryInformation getInformation() {
}

// Add Monitor information
SummaryInformation xml = new SummaryInformation(mmi.tServerInfo.size(),
ManagerResource.getTables(monitor), TablesResource.getTables(monitor));
SummaryInformation xml =
new SummaryInformation(mmi.tServerInfo.size(), TablesResource.getTables(monitor));

// Add tserver information
for (TabletServerStatus status : mmi.tServerInfo) {
Expand Down

This file was deleted.

This file was deleted.

Loading