dlmarion commented on code in PR #5875:
URL: https://github.com/apache/accumulo/pull/5875#discussion_r2355941407
##########
core/src/main/java/org/apache/accumulo/core/client/admin/servers/ServerId.java:
##########
@@ -18,42 +18,167 @@
*/
package org.apache.accumulo.core.client.admin.servers;
+import static org.apache.accumulo.core.util.LazySingletons.GSON;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
import java.util.Objects;
import org.apache.accumulo.core.conf.PropertyType.PortRange;
import org.apache.accumulo.core.data.ResourceGroupId;
+import org.apache.accumulo.core.util.cache.Caches;
+import org.apache.accumulo.core.util.cache.Caches.CacheName;
+import com.github.benmanes.caffeine.cache.Cache;
import com.google.common.base.Preconditions;
+import com.google.common.net.HostAndPort;
/**
* Object representing the type, resource group, and address of a server
process.
*
* @since 4.0.0
*/
-public final class ServerId implements Comparable<ServerId> {
+public final class ServerId implements Comparable<ServerId>, Serializable {
+
+ private static final long serialVersionUID = 1L;
/**
* Server process type names.
*
* @since 4.0.0
*/
public enum Type {
- MANAGER, MONITOR, GARBAGE_COLLECTOR, COMPACTOR, SCAN_SERVER, TABLET_SERVER;
+ MANAGER, MINI, MONITOR, GARBAGE_COLLECTOR, COMPACTOR, SCAN_SERVER,
TABLET_SERVER;
+ }
+
+ public static record ServerIdInfo(String type, String resourceGroup, String
host, int port) {
Review Comment:
> ServerIdInfo seems like its needed for implementation of caching and
serialization, but maybe not intended to be in the public API?
I moved this and other internal implementation methods to a new class,
ServerIdUtil, in fb6acbb.
> No idea if this makes sense or would be workable, but looking at this
wonder if ServerId should be a record
I looked at this, and I don't think it can be done right now due to the
`transient` field `hostPort`.
--
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]