You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "EdColeman (via GitHub)" <gi...@apache.org> on 2024/05/16 20:16:36 UTC
[PR] Add service status as command option to admin command [accumulo]
EdColeman opened a new pull request, #4567:
URL: https://github.com/apache/accumulo/pull/4567
Adds a admin command `serviceStatus` to print service counts and hosts, with resource groups when appropriate to stdout.
To run the command:
` > accumulo admin serviceStatus [--noHosts ] [--json]`
The noHost option output provides a summary count
The --json option provides unformatted json output (the --noHost option is ignored)
Sample output:
<details>
<summary>Summary (service counts only)</summary>
```
> accumulo admin serviceStatus --noHosts
Report time: 2024-05-16T20:05:45.493Z
ZooKeeper read errors: 0
Managers: count: 1
Monitors: count: 1
Garbage Collectors: count: 1
Tablet Servers: count: 2
Scan Servers: count: 4
Coordinators: count: 1
Compactors: count: 4
```
</details>
<details>
<summary>Full status</summary>
```
> accumulo admin serviceStatus
Report time: 2024-05-16T20:04:09.556Z
ZooKeeper read errors: 0
Managers: count: 1
localhost:9999
Monitors: count: 1
localhost:9995
Garbage Collectors: count: 1
localhost:9998
Tablet Servers: count: 2
localhost:10000
localhost:9997
Scan Servers: count: 4
resource groups:
default
sg1
hosts (by group):
default: localhost:10003
default: localhost:9996
sg1: localhost:10004
sg1: localhost:10005
Coordinators: count: 1
localhost:9132
Compactors: count: 4
resource groups:
q1
q2
hosts (by group):
q1: localhost:9133
q1: localhost:9134
q2: localhost:9135
q2: localhost:9136
```
</details>
<details>
<summary>Full status formatted as json</summary>
```
> accumulo admin serviceStatus --json | jq (normally the output is unformatted)
{
"reportTime": "2024-05-16T20:01:39.593Z",
"zkReadErrors": 0,
"noHosts": false,
"summaryMap": {
"COMPACTOR": {
"reportKey": "COMPACTOR",
"resourceGroups": [
"q1",
"q2"
],
"serviceNames": [
"q1: localhost:9133",
"q1: localhost:9134",
"q2: localhost:9135",
"q2: localhost:9136"
],
"serviceCount": 4,
"errorCount": 0
},
"COORDINATOR": {
"reportKey": "COORDINATOR",
"resourceGroups": [],
"serviceNames": [
"localhost:9132"
],
"serviceCount": 1,
"errorCount": 0
},
"GC": {
"reportKey": "GC",
"resourceGroups": [],
"serviceNames": [
"localhost:9998"
],
"serviceCount": 1,
"errorCount": 0
},
"MANAGER": {
"reportKey": "MANAGER",
"resourceGroups": [],
"serviceNames": [
"localhost:9999"
],
"serviceCount": 1,
"errorCount": 0
},
"MONITOR": {
"reportKey": "MONITOR",
"resourceGroups": [],
"serviceNames": [
"localhost:9995"
],
"serviceCount": 1,
"errorCount": 0
},
"S_SERVER": {
"reportKey": "S_SERVER",
"resourceGroups": [
"default",
"sg1"
],
"serviceNames": [
"default: localhost:10003",
"default: localhost:9996",
"sg1: localhost:10004",
"sg1: localhost:10005"
],
"serviceCount": 4,
"errorCount": 0
},
"T_SERVER": {
"reportKey": "T_SERVER",
"resourceGroups": [],
"serviceNames": [
"localhost:10000",
"localhost:9997"
],
"serviceCount": 2,
"errorCount": 0
}
}
}
```
</details>
Fixes #4495
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add service status as command option to admin command [accumulo]
Posted by "EdColeman (via GitHub)" <gi...@apache.org>.
EdColeman merged PR #4567:
URL: https://github.com/apache/accumulo/pull/4567
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add service status as command option to admin command [accumulo]
Posted by "EdColeman (via GitHub)" <gi...@apache.org>.
EdColeman commented on code in PR #4567:
URL: https://github.com/apache/accumulo/pull/4567#discussion_r1609056212
##########
server/base/src/main/java/org/apache/accumulo/server/util/serviceStatus/ServiceStatusReport.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.server.util.serviceStatus;
+
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.gson.Gson;
+
+/**
+ * Wrapper for JSON formatted report.
+ */
+public class ServiceStatusReport {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ServiceStatusReport.class);
+
+ private static final Gson gson = new Gson();
+
+ private static final DateTimeFormatter rptTimeFmt =
+ DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ private static final String I2 = " ";
+ private static final String I4 = " ";
+
+ private final String reportTime;
+ private final int zkReadErrors;
+ private final boolean noHosts;
+ private final Map<ReportKey,StatusSummary> summaryMap;
+
+ public ServiceStatusReport(final Map<ReportKey,StatusSummary> summaryMap, final boolean noHosts) {
+ reportTime = rptTimeFmt.format(ZonedDateTime.now(ZoneId.of("UTC")));
+ zkReadErrors = summaryMap.values().stream().map(StatusSummary::getErrorCount)
+ .reduce(Integer::sum).orElse(0);
+ this.noHosts = noHosts;
+ this.summaryMap = summaryMap;
+ }
+
+ public String getReportTime() {
+ return reportTime;
+ }
+
+ public Map<ReportKey,StatusSummary> getSummaryMap() {
+ return summaryMap;
+ }
+
+ public String toJson() {
+ return gson.toJson(this, ServiceStatusReport.class);
+ }
+
+ public String report(final StringBuilder sb) {
+ sb.append("Report time: ").append(rptTimeFmt.format(ZonedDateTime.now(ZoneId.of("UTC"))))
+ .append("\n");
+ int zkErrors = summaryMap.values().stream().map(StatusSummary::getErrorCount)
+ .reduce(Integer::sum).orElse(0);
+ sb.append("ZooKeeper read errors: ").append(zkErrors).append("\n");
+
+ writeServiceStatus(sb, ReportKey.MANAGER, summaryMap.get(ReportKey.MANAGER), noHosts);
+ writeServiceStatus(sb, ReportKey.MONITOR, summaryMap.get(ReportKey.MONITOR), noHosts);
+ writeServiceStatus(sb, ReportKey.GC, summaryMap.get(ReportKey.GC), noHosts);
+ writeServiceStatus(sb, ReportKey.T_SERVER, summaryMap.get(ReportKey.T_SERVER), noHosts);
+ writeResourceGroups(sb, ReportKey.S_SERVER, summaryMap.get(ReportKey.S_SERVER), noHosts);
+ writeServiceStatus(sb, ReportKey.COORDINATOR, summaryMap.get(ReportKey.COORDINATOR), noHosts);
+ writeResourceGroups(sb, ReportKey.COMPACTOR, summaryMap.get(ReportKey.COMPACTOR), noHosts);
+
+ sb.append("\n");
+ LOG.trace("fmtStatus - with hosts: {}", summaryMap);
+ return sb.toString();
+ }
+
+ public void writeServiceStatus(final StringBuilder sb, final ReportKey displayNames,
+ final StatusSummary summary, boolean noHosts) {
+ if (summary == null) {
+ sb.append(displayNames).append(": unavailable").append("\n");
+ return;
+ }
+
+ writeCounts(sb, summary);
+
+ // skip host info if requested
+ if (noHosts) {
+ return;
+ }
+ if (summary.getServiceCount() > 0) {
+ var hosts = summary.getServiceNames();
+ hosts.forEach(h -> sb.append(I2).append(h).append("\n"));
+ }
+ }
+
+ private void writeCounts(StringBuilder sb, StatusSummary summary) {
+ sb.append(summary.getDisplayName()).append(": count: ").append(summary.getServiceCount());
+ if (summary.getErrorCount() > 0) {
+ sb.append(", (ZooKeeper errors: ").append(summary.getErrorCount()).append(")\n");
+ } else {
+ sb.append("\n");
+ }
+ }
+
+ private void writeResourceGroups(final StringBuilder sb, final ReportKey reportKey,
+ final StatusSummary summary, boolean noHosts) {
+ if (summary == null) {
+ sb.append(reportKey).append(": unavailable").append("\n");
+ return;
+ }
+
+ writeCounts(sb, summary);
+
+ // skip host info if requested
+ if (noHosts) {
+ return;
+ }
+ if (!summary.getResourceGroups().isEmpty()) {
+ sb.append(I2).append("resource groups:\n");
+ summary.getResourceGroups().forEach(g -> sb.append(I4).append(g).append("\n"));
Review Comment:
Address in f5f92218bd
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add service status as command option to admin command [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #4567:
URL: https://github.com/apache/accumulo/pull/4567#discussion_r1605246152
##########
server/base/src/main/java/org/apache/accumulo/server/util/serviceStatus/ServiceStatusReport.java:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.server.util.serviceStatus;
+
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.gson.Gson;
+
+/**
+ * Wrapper for JSON formatted report.
+ */
+public class ServiceStatusReport {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ServiceStatusReport.class);
+
+ private static final Gson gson = new Gson();
+
+ private static final DateTimeFormatter rptTimeFmt =
+ DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ private static final String I2 = " ";
+ private static final String I4 = " ";
+
+ private final String reportTime;
+ private final int zkReadErrors;
+ private final boolean noHosts;
+ private final Map<ReportKey,StatusSummary> summaryMap;
+
+ public ServiceStatusReport(final Map<ReportKey,StatusSummary> summaryMap, final boolean noHosts) {
+ reportTime = rptTimeFmt.format(ZonedDateTime.now(ZoneId.of("UTC")));
+ zkReadErrors = summaryMap.values().stream().map(StatusSummary::getErrorCount)
+ .reduce(Integer::sum).orElse(0);
+ this.noHosts = noHosts;
+ this.summaryMap = summaryMap;
+ }
+
+ public String getReportTime() {
+ return reportTime;
+ }
+
+ public Map<ReportKey,StatusSummary> getSummaryMap() {
+ return summaryMap;
+ }
+
+ public String toJson() {
+ return gson.toJson(this, ServiceStatusReport.class);
+ }
+
+ public String report(final StringBuilder sb) {
+ sb.append("Report time: ").append(rptTimeFmt.format(ZonedDateTime.now(ZoneId.of("UTC"))))
+ .append("\n");
+ int zkErrors = summaryMap.values().stream().map(StatusSummary::getErrorCount)
+ .reduce(Integer::sum).orElse(0);
+ sb.append("ZooKeeper read errors: ").append(zkErrors).append("\n");
+
+ writeServiceStatus(sb, ReportKey.MANAGER, summaryMap.get(ReportKey.MANAGER), noHosts);
+ writeServiceStatus(sb, ReportKey.MONITOR, summaryMap.get(ReportKey.MONITOR), noHosts);
+ writeServiceStatus(sb, ReportKey.GC, summaryMap.get(ReportKey.GC), noHosts);
+ writeServiceStatus(sb, ReportKey.T_SERVER, summaryMap.get(ReportKey.T_SERVER), noHosts);
+ writeResourceGroups(sb, ReportKey.S_SERVER, summaryMap.get(ReportKey.S_SERVER), noHosts);
+ writeServiceStatus(sb, ReportKey.COORDINATOR, summaryMap.get(ReportKey.COORDINATOR), noHosts);
+ writeResourceGroups(sb, ReportKey.COMPACTOR, summaryMap.get(ReportKey.COMPACTOR), noHosts);
+
+ sb.append("\n");
+ LOG.trace("fmtStatus - with hosts: {}", summaryMap);
+ return sb.toString();
+ }
+
+ public void writeServiceStatus(final StringBuilder sb, final ReportKey displayNames,
+ final StatusSummary summary, boolean noHosts) {
+ if (summary == null) {
+ sb.append(displayNames).append(": unavailable").append("\n");
+ return;
+ }
+
+ writeCounts(sb, summary);
+
+ // skip host info if requested
+ if (noHosts) {
+ return;
+ }
+ if (summary.getServiceCount() > 0) {
+ var hosts = summary.getServiceNames();
+ hosts.forEach(h -> sb.append(I2).append(h).append("\n"));
+ }
+ }
+
+ private void writeCounts(StringBuilder sb, StatusSummary summary) {
+ sb.append(summary.getDisplayName()).append(": count: ").append(summary.getServiceCount());
+ if (summary.getErrorCount() > 0) {
+ sb.append(", (ZooKeeper errors: ").append(summary.getErrorCount()).append(")\n");
+ } else {
+ sb.append("\n");
+ }
+ }
+
+ private void writeResourceGroups(final StringBuilder sb, final ReportKey reportKey,
+ final StatusSummary summary, boolean noHosts) {
+ if (summary == null) {
+ sb.append(reportKey).append(": unavailable").append("\n");
+ return;
+ }
+
+ writeCounts(sb, summary);
+
+ // skip host info if requested
+ if (noHosts) {
+ return;
+ }
+ if (!summary.getResourceGroups().isEmpty()) {
+ sb.append(I2).append("resource groups:\n");
+ summary.getResourceGroups().forEach(g -> sb.append(I4).append(g).append("\n"));
Review Comment:
Do we need to print the groups twice? I wonder if we could print something like:
```
Group: DEFAULT
localhost:1234
localhost:1235
Group: Group1
localhost:1236
```
##########
server/base/src/main/java/org/apache/accumulo/server/util/ServiceStatusCmd.java:
##########
@@ -0,0 +1,336 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.server.util;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.fate.zookeeper.ZooReader;
+import org.apache.accumulo.core.util.Pair;
+import org.apache.accumulo.core.util.ServerServices;
+import org.apache.accumulo.server.ServerContext;
+import org.apache.accumulo.server.util.serviceStatus.ServiceStatusReport;
+import org.apache.accumulo.server.util.serviceStatus.StatusSummary;
+import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import com.google.common.annotations.VisibleForTesting;
+
+public class ServiceStatusCmd {
+ private static final Logger LOG = LoggerFactory.getLogger(ServiceStatusCmd.class);
+
+ public ServiceStatusCmd() {}
+
+ /**
+ * ServerServices writes lock data as SERVICE=host. This strips the SERVICE= from the string.
+ *
+ * @return a sort set of host names.
+ */
+ private static Set<String> stripServiceName(Set<String> hostnames) {
+ return hostnames.stream().map(h -> {
+ if (h.contains(ServerServices.SEPARATOR_CHAR)) {
+ return h.substring(h.indexOf(ServerServices.SEPARATOR_CHAR) + 1);
+ }
+ return h;
+ }).collect(Collectors.toCollection(TreeSet::new));
+ }
+
+ /**
+ * Read the service statuses from ZooKeeper, build the status report and then output the report to
+ * stdout.
+ */
+ public void execute(final ServerContext context, final Opts opts) {
+
+ ZooReader zooReader = context.getZooReader();
+
+ final String zooRoot = context.getZooKeeperRoot();
+ LOG.trace("zooRoot: {}", zooRoot);
+
+ final Map<ServiceStatusReport.ReportKey,StatusSummary> services = new TreeMap<>();
+
+ services.put(ServiceStatusReport.ReportKey.MANAGER, getManagerStatus(zooReader, zooRoot));
+ services.put(ServiceStatusReport.ReportKey.MONITOR, getMonitorStatus(zooReader, zooRoot));
+ services.put(ServiceStatusReport.ReportKey.T_SERVER, getTServerStatus(zooReader, zooRoot));
+ services.put(ServiceStatusReport.ReportKey.S_SERVER, getScanServerStatus(zooReader, zooRoot));
+ services.put(ServiceStatusReport.ReportKey.COORDINATOR,
+ getCoordinatorStatus(zooReader, zooRoot));
+ services.put(ServiceStatusReport.ReportKey.COMPACTOR, getCompactorStatus(zooReader, zooRoot));
+ services.put(ServiceStatusReport.ReportKey.GC, getGcStatus(zooReader, zooRoot));
+
+ ServiceStatusReport report = new ServiceStatusReport(services, opts.noHosts);
+
+ if (opts.json) {
+ System.out.println(report.toJson());
+ } else {
+ StringBuilder sb = new StringBuilder(8192);
+ report.report(sb);
+ System.out.println(sb);
+ }
+ }
+
+ /**
+ * The manager paths in ZooKeeper are: {@code /accumulo/[IID]/managers/lock/zlock#[NUM]} with the
+ * lock data providing host:port.
+ */
+ @VisibleForTesting
+ StatusSummary getManagerStatus(final ZooReader zooReader, String zRootPath) {
+ String lockPath = zRootPath + Constants.ZMANAGER_LOCK;
+ return getStatusSummary(ServiceStatusReport.ReportKey.MANAGER, zooReader, lockPath);
+ }
+
+ /**
+ * The monitor paths in ZooKeeper are: {@code /accumulo/[IID]/monitor/lock/zlock#[NUM]} with the
+ * lock data providing host:port.
+ */
+ @VisibleForTesting
+ StatusSummary getMonitorStatus(final ZooReader zooReader, String zRootPath) {
+ String lockPath = zRootPath + Constants.ZMONITOR_LOCK;
+ return getStatusSummary(ServiceStatusReport.ReportKey.MONITOR, zooReader, lockPath);
+ }
+
+ /**
+ * The tserver paths in ZooKeeper are: {@code /accumulo/[IID]/tservers/[host:port]/zlock#[NUM]}
+ * with the lock data providing TSERV_CLIENT=host:port.
+ */
+ @VisibleForTesting
+ StatusSummary getTServerStatus(final ZooReader zooReader, String zRootPath) {
+ String lockPath = zRootPath + Constants.ZTSERVERS;
+ return getServerHostStatus(zooReader, lockPath, ServiceStatusReport.ReportKey.T_SERVER);
+ }
+
+ /**
+ * The sserver paths in ZooKeeper are: {@code /accumulo/[IID]/sservers/[host:port]/zlock#[NUM]}
+ * with the lock data providing [UUID],[GROUP]
+ */
+ @VisibleForTesting
+ StatusSummary getScanServerStatus(final ZooReader zooReader, String zRootPath) {
+ String lockPath = zRootPath + Constants.ZSSERVERS;
+ return getServerHostStatus(zooReader, lockPath, ServiceStatusReport.ReportKey.S_SERVER);
+ }
+
+ /**
+ * handles paths for tservers and servers with the lock stored beneath the host: port like:
+ * {@code /accumulo/IID/[tservers | sservers]/HOST:PORT/[LOCK]}
+ */
+ private StatusSummary getServerHostStatus(final ZooReader zooReader, String basePath,
+ ServiceStatusReport.ReportKey displayNames) {
+ AtomicInteger errorSum = new AtomicInteger(0);
+
+ Set<String> hostNames = new TreeSet<>();
+ Set<String> groupNames = new TreeSet<>();
+
+ var nodeNames = readNodeNames(zooReader, basePath);
+
+ nodeNames.getSecond().forEach(name -> {
+ var lock = readNodeNames(zooReader, basePath + "/" + name);
+ lock.getSecond().forEach(l -> {
+ var r = readNodeData(zooReader, basePath + "/" + name + "/" + l);
+ int err = r.getFirst();
+ if (err > 0) {
+ errorSum.addAndGet(r.getFirst());
+ } else {
+ // process resource groups
+ var payload = r.getSecond();
+ String[] tokens = payload.split(",");
+ String groupSeparator = "";
+ if (tokens.length == 2) {
+ groupNames.add(tokens[1]);
+ groupSeparator = tokens[1] + ": ";
+ }
Review Comment:
Is this parsing the lock content represented by the ServerServices object? If so, be aware that this changed in 3.1, ref: https://github.com/apache/accumulo/blob/main/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java#L664
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add service status as command option to admin command [accumulo]
Posted by "EdColeman (via GitHub)" <gi...@apache.org>.
EdColeman commented on PR #4567:
URL: https://github.com/apache/accumulo/pull/4567#issuecomment-2123601483
The output changes in f5f92218bd organize services by resource group. This slightly modifies the command and the json output.
<details>
<summary>text output</summary>
```
> accumulo admin serviceStatus
Report time: 2024-05-21T23:06:21.084Z
ZooKeeper read errors: 0
Managers: count: 1
localhost:9999
Monitors: count: 1
localhost:9995
Garbage Collectors: count: 1
localhost:9998
Tablet Servers: count: 2
localhost:10000
localhost:9997
Scan Servers: count: 4
resource groups:
default
sg1
hosts (by group):
default (2):
localhost:10003
localhost:9996
sg1 (2):
localhost:10004
localhost:10005
Coordinators: count: 1
localhost:9132
Compactors: count: 4
resource groups:
q1
q2
hosts (by group):
q1 (2):
localhost:9133
localhost:9134
q2 (2):
localhost:9135
localhost:9136
```
</details>
<details>
<summary>json output (formatted with jq)</summary>
```
> accumulo admin serviceStatus --json | jq
{
"reportTime": "2024-05-21T23:06:31.596Z",
"zkReadErrors": 0,
"noHosts": false,
"summaries": {
"COMPACTOR": {
"serviceType": "COMPACTOR",
"resourceGroups": [
"q1",
"q2"
],
"serviceByGroups": {
"q1": [
"localhost:9133",
"localhost:9134"
],
"q2": [
"localhost:9135",
"localhost:9136"
]
},
"serviceCount": 4,
"errorCount": 0
},
"COORDINATOR": {
"serviceType": "COORDINATOR",
"resourceGroups": [],
"serviceByGroups": {
"NO_GROUP": [
"localhost:9132"
]
},
"serviceCount": 1,
"errorCount": 0
},
"GC": {
"serviceType": "GC",
"resourceGroups": [],
"serviceByGroups": {
"NO_GROUP": [
"localhost:9998"
]
},
"serviceCount": 1,
"errorCount": 0
},
"MANAGER": {
"serviceType": "MANAGER",
"resourceGroups": [],
"serviceByGroups": {
"NO_GROUP": [
"localhost:9999"
]
},
"serviceCount": 1,
"errorCount": 0
},
"MONITOR": {
"serviceType": "MONITOR",
"resourceGroups": [],
"serviceByGroups": {
"NO_GROUP": [
"localhost:9995"
]
},
"serviceCount": 1,
"errorCount": 0
},
"S_SERVER": {
"serviceType": "S_SERVER",
"resourceGroups": [
"default",
"sg1"
],
"serviceByGroups": {
"default": [
"localhost:10003",
"localhost:9996"
],
"sg1": [
"localhost:10004",
"localhost:10005"
]
},
"serviceCount": 4,
"errorCount": 0
},
"T_SERVER": {
"serviceType": "T_SERVER",
"resourceGroups": [],
"serviceByGroups": {
"NO_GROUP": [
"localhost:10000",
"localhost:9997"
]
},
"serviceCount": 2,
"errorCount": 0
}
}
}
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org