dlmarion commented on code in PR #4851:
URL: https://github.com/apache/accumulo/pull/4851#discussion_r1742460150
##########
core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java:
##########
@@ -181,41 +184,90 @@ Map<String,String>
modifyProperties(Consumer<Map<String,String>> mapMutator)
*
* @return a list of locations in <code>hostname:port</code> form.
* @since 2.1.0
+ * @deprecated see {@link #getServers(ServerTypeName)}
*/
+ @Deprecated(since = "4.0.0")
List<String> getManagerLocations();
/**
* Returns the locations of the active compactors
*
* @return A set of currently active compactors.
* @since 2.1.4
+ * @deprecated see {@link #getServers(ServerTypeName)}
*/
+ @Deprecated(since = "4.0.0")
Set<String> getCompactors();
/**
* Returns the locations of the active scan servers
*
* @return A set of currently active scan servers.
+ * @deprecated see {@link #getServers(ServerTypeName)}
*/
+ @Deprecated(since = "4.0.0")
Set<String> getScanServers();
/**
* List the currently active tablet servers participating in the accumulo
instance
*
* @return A list of currently active tablet servers.
+ * @deprecated see {@link #getServers(ServerTypeName)}
*/
+ @Deprecated(since = "4.0.0")
List<String> getTabletServers();
+ /**
+ * Resolve the server of the given type and address to a ServerId
+ *
+ * @param type type of server
+ * @param host host name
+ * @param port host port
+ * @return ServerId if found, else null
+ * @since 4.0.0
+ */
+ ServerId getServer(ServerTypeName type, String host, int port);
+
+ /**
+ * Returns all servers of the given types
+ *
+ * @return set of servers of the supplied types matching the supplied test
+ * @since 4.0.0
+ */
+ Set<ServerId> getServers(ServerTypeName type);
+
+ /**
+ * Returns the servers of a given type that match the given criteria
+ *
+ * @return set of servers of the supplied types matching the supplied test
+ * @since 4.0.0
+ */
+ Set<ServerId> getServers(ServerTypeName type, Predicate<ServerId> test);
Review Comment:
> Maybe we could first do a PR to add RG filtering to listscans and
listcompactions in the shell and then later PRs to optimize the filtering.
Issue #4782 has been submitted to add filtering to list compactions. I"m not
sure which version that solution will target. IMO, this PR is an optimization
for that filtering, specifically for the 4.0 version. I think there could be
further optimization done, as you suggested, in another PR that also targets
4.0 to put the resource group in the zookeeper path. It may make sense to
create the other PR for the 4.0 version now (the one that reorganizes the
zookeeper path), and merge that before this PR.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]