You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dl...@apache.org on 2016/03/31 15:16:45 UTC
[1/2] accumulo git commit: ACCUMULO-4169: Remove contexts not defined
in the configuration
Repository: accumulo
Updated Branches:
refs/heads/ACCUMULO-4169 [created] 7a654ee06
ACCUMULO-4169: Remove contexts not defined in the configuration
Contexts can be defined and not configured for a table, which are then used on Scanners. By
cleaning up contexts not defined on tables, contexts could be closed while they are in use in
a scan session. Only clean up contexts that are not in the configuration.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0b2f2886
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0b2f2886
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0b2f2886
Branch: refs/heads/ACCUMULO-4169
Commit: 0b2f28860817cc41fde48126b969de704cbd60d4
Parents: 1d49030
Author: Dave Marion <dl...@apache.org>
Authored: Tue Mar 29 13:27:07 2016 -0400
Committer: Dave Marion <dl...@apache.org>
Committed: Tue Mar 29 13:27:07 2016 -0400
----------------------------------------------------------------------
.../apache/accumulo/tserver/TabletServer.java | 25 +++-----------------
.../start/classloader/vfs/ContextManager.java | 4 ++--
2 files changed, 5 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0b2f2886/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 d19dfa9..6a4cf67 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,29 +2753,10 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
Runnable contextCleaner = new Runnable() {
@Override
public void run() {
- ArrayList<KeyExtent> extents;
-
- synchronized (onlineTablets) {
- extents = new ArrayList<KeyExtent>(onlineTablets.keySet());
- }
-
- Set<String> tables = new HashSet<String>();
-
- for (KeyExtent keyExtent : extents) {
- tables.add(keyExtent.getTableId());
- }
-
- HashSet<String> contexts = new HashSet<String>();
-
- for (String tableid : tables) {
- String context = getTableConfiguration(new KeyExtent(tableid, null, null)).get(Property.TABLE_CLASSPATH);
- if (!context.equals("")) {
- contexts.add(context);
- }
- }
-
+ Set<String> configuredContexts = getServerConfigurationFactory().getConfiguration().getAllPropertiesWithPrefix(Property.VFS_CONTEXT_CLASSPATH_PROPERTY)
+ .keySet();
try {
- AccumuloVFSClassLoader.getContextManager().removeUnusedContexts(contexts);
+ AccumuloVFSClassLoader.getContextManager().removeUnusedContexts(configuredContexts);
} catch (IOException e) {
log.warn("{}", e.getMessage(), e);
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0b2f2886/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 1cf8637..fc793c3 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
@@ -189,13 +189,13 @@ public class ContextManager {
}
}
- public void removeUnusedContexts(Set<String> inUse) {
+ public void removeUnusedContexts(Set<String> configuredContexts) {
Map<String,Context> unused;
synchronized (this) {
unused = new HashMap<String,Context>(contexts);
- unused.keySet().removeAll(inUse);
+ unused.keySet().removeAll(configuredContexts);
contexts.keySet().removeAll(unused.keySet());
}
[2/2] accumulo git commit: Add property to accumulo-env.sh
Posted by dl...@apache.org.
Add property to accumulo-env.sh
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7a654ee0
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7a654ee0
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7a654ee0
Branch: refs/heads/ACCUMULO-4169
Commit: 7a654ee0644815f7a0244d342333c75de667adb2
Parents: 0b2f288
Author: Dave Marion <dl...@apache.org>
Authored: Thu Mar 31 09:15:25 2016 -0400
Committer: Dave Marion <dl...@apache.org>
Committed: Thu Mar 31 09:15:25 2016 -0400
----------------------------------------------------------------------
assemble/conf/templates/accumulo-env.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7a654ee0/assemble/conf/templates/accumulo-env.sh
----------------------------------------------------------------------
diff --git a/assemble/conf/templates/accumulo-env.sh b/assemble/conf/templates/accumulo-env.sh
index 205bd6c..2ad753a 100644
--- a/assemble/conf/templates/accumulo-env.sh
+++ b/assemble/conf/templates/accumulo-env.sh
@@ -49,7 +49,7 @@ test -z "$ACCUMULO_MASTER_OPTS" && export ACCUMULO_MASTER_OPTS="${POLICY} ${mas
test -z "$ACCUMULO_MONITOR_OPTS" && export ACCUMULO_MONITOR_OPTS="${POLICY} ${monitorHigh_monitorLow}"
test -z "$ACCUMULO_GC_OPTS" && export ACCUMULO_GC_OPTS="${gcHigh_gcLow}"
test -z "$ACCUMULO_SHELL_OPTS" && export ACCUMULO_SHELL_OPTS="${shellHigh_shellLow}"
-test -z "$ACCUMULO_GENERAL_OPTS" && export ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -Djava.net.preferIPv4Stack=true"
+test -z "$ACCUMULO_GENERAL_OPTS" && export ACCUMULO_GENERAL_OPTS="-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -Djava.net.preferIPv4Stack=true -XX:+CMSClassUnloadingEnabled"
test -z "$ACCUMULO_OTHER_OPTS" && export ACCUMULO_OTHER_OPTS="${otherHigh_otherLow}"
test -z "${ACCUMULO_PID_DIR}" && export ACCUMULO_PID_DIR="${ACCUMULO_HOME}/run"
# what do when the JVM runs out of heap memory