This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push:
new 1ec9925340 Removed ServerInfo variable for ZooCache, only used in
constructor (#5731)
1ec9925340 is described below
commit 1ec9925340cdd0b6c015178fff21bbbac4eb927d
Author: Dave Marion <[email protected]>
AuthorDate: Wed Jul 9 14:24:14 2025 -0400
Removed ServerInfo variable for ZooCache, only used in constructor (#5731)
---
.../base/src/main/java/org/apache/accumulo/server/ServerInfo.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/server/base/src/main/java/org/apache/accumulo/server/ServerInfo.java
b/server/base/src/main/java/org/apache/accumulo/server/ServerInfo.java
index d9eccd6ecb..062a4d24be 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/ServerInfo.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/ServerInfo.java
@@ -52,7 +52,6 @@ public class ServerInfo implements ClientInfo {
private final String zooKeepers;
private final int zooKeepersSessionTimeOut;
private final VolumeManager volumeManager;
- private final ZooCache zooCache;
private final ServerDirs serverDirs;
private final Credentials credentials;
@@ -69,7 +68,7 @@ public class ServerInfo implements ClientInfo {
} catch (IOException e) {
throw new IllegalStateException(e);
}
- zooCache = new ZooCacheFactory().getZooCache(zooKeepers,
zooKeepersSessionTimeOut);
+ ZooCache zooCache = new ZooCacheFactory().getZooCache(zooKeepers,
zooKeepersSessionTimeOut);
String instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" +
instanceName;
byte[] iidb = zooCache.get(instanceNamePath);
if (iidb == null) {
@@ -102,7 +101,7 @@ public class ServerInfo implements ClientInfo {
instanceID = VolumeManager.getInstanceIDFromHdfs(instanceIdPath,
hadoopConf);
zooKeepers = config.get(Property.INSTANCE_ZK_HOST);
zooKeepersSessionTimeOut = (int)
config.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT);
- zooCache = new ZooCacheFactory().getZooCache(zooKeepers,
zooKeepersSessionTimeOut);
+ ZooCache zooCache = new ZooCacheFactory().getZooCache(zooKeepers,
zooKeepersSessionTimeOut);
instanceName = InstanceOperationsImpl.lookupInstanceName(zooCache,
instanceID);
credentials = SystemCredentials.get(instanceID, siteConfig);
}
@@ -119,7 +118,6 @@ public class ServerInfo implements ClientInfo {
this.instanceID = instanceID;
zooKeepers = config.get(Property.INSTANCE_ZK_HOST);
zooKeepersSessionTimeOut = (int)
config.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT);
- zooCache = new ZooCacheFactory().getZooCache(zooKeepers,
zooKeepersSessionTimeOut);
this.instanceName = instanceName;
serverDirs = new ServerDirs(siteConfig, hadoopConf);
credentials = SystemCredentials.get(instanceID, siteConfig);