accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlmar...@apache.org
Subject accumulo git commit: ACCUMULO-4169: Added comment to avoid confusion in the method, substring context name from property
Date Thu, 31 Mar 2016 13:37:49 GMT
Repository: accumulo
Updated Branches:
  refs/heads/ACCUMULO-4169 7a654ee06 -> 4c4c421a9


ACCUMULO-4169: Added comment to avoid confusion in the method, substring context name from
property


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4c4c421a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4c4c421a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4c4c421a

Branch: refs/heads/ACCUMULO-4169
Commit: 4c4c421a964b799a9aecb8d1042b4e1e36e7dc9b
Parents: 7a654ee
Author: Dave Marion <dlmarion@apache.org>
Authored: Thu Mar 31 09:36:44 2016 -0400
Committer: Dave Marion <dlmarion@apache.org>
Committed: Thu Mar 31 09:36:44 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/tserver/TabletServer.java    | 6 +++++-
 .../apache/accumulo/start/classloader/vfs/ContextManager.java  | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4c4c421a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 6a4cf67..9703468 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -2753,8 +2753,12 @@ public class TabletServer extends AccumuloServerContext implements
Runnable {
     Runnable contextCleaner = new Runnable() {
       @Override
       public void run() {
-        Set<String> configuredContexts = getServerConfigurationFactory().getConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY)
+        Set<String> contextProperties = getServerConfigurationFactory().getConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY)
             .keySet();
+        Set<String> configuredContexts = new HashSet<>();
+        for (String prop : contextProperties) {
+          configuredContexts.add(prop.substring(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.name().length()));
+        }
         try {
           AccumuloVFSClassLoader.getContextManager().removeUnusedContexts(configuredContexts);
         } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4c4c421a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
----------------------------------------------------------------------
diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
index fc793c3..c873fa6 100644
--- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
+++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/ContextManager.java
@@ -193,6 +193,9 @@ public class ContextManager {
 
     Map<String,Context> unused;
 
+    // ContextManager knows of some set of contexts. This method will be called with
+    // the set of currently configured contexts. We will close the contexts that are
+    // no longer in the configuration.
     synchronized (this) {
       unused = new HashMap<String,Context>(contexts);
       unused.keySet().removeAll(configuredContexts);


Mime
View raw message