accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject accumulo git commit: ACCUMULO-3384 support custom system props
Date Thu, 20 Apr 2017 16:28:58 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master f83a377e7 -> f70f50703


ACCUMULO-3384 support custom system props

Add a property prefix for custom system-wide properties to support
system-wide configuration for pluggable Accumulo components.


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

Branch: refs/heads/master
Commit: f70f507034aeadea54db86ff3dab74cbe2d271eb
Parents: f83a377
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Thu Apr 20 11:51:52 2017 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Apr 20 11:51:52 2017 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/core/conf/Property.java   | 3 +++
 .../java/org/apache/accumulo/server/fs/VolumeChooser.java   | 5 +++++
 .../accumulo/server/master/balancer/TabletBalancer.java     | 9 +++++++++
 3 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f70f5070/core/src/main/java/org/apache/accumulo/core/conf/Property.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 94f495a..5ca6496 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -199,6 +199,9 @@ public enum Property {
       "Comma-separated list of paths to CredentialProviders"),
   GENERAL_LEGACY_METRICS("general.legacy.metrics", "false", PropertyType.BOOLEAN,
       "Use the old metric infrastructure configured by accumulo-metrics.xml, instead of Hadoop
Metrics2"),
+  GENERAL_ARBITRARY_PROP_PREFIX("general.custom.", null, PropertyType.PREFIX, "Prefix to
be used for user defined system-wide properties. "
+      + "This may be particularly useful for system-wide configuration for various user-implementations
of "
+      + "pluggable Accumulo features, such as the balancer or volume chooser."),
   GENERAL_DELEGATION_TOKEN_LIFETIME("general.delegation.token.lifetime", "7d", PropertyType.TIMEDURATION,
       "The length of time that delegation tokens and secret keys are valid"),
   GENERAL_DELEGATION_TOKEN_UPDATE_INTERVAL("general.delegation.token.update.interval", "1d",
PropertyType.TIMEDURATION,

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f70f5070/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooser.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooser.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooser.java
index 8b70721..e8c1049 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooser.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeChooser.java
@@ -16,11 +16,16 @@
  */
 package org.apache.accumulo.server.fs;
 
+import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.volume.Volume;
 
 /**
  * Helper used by {@link VolumeManager}s to select from a set of {@link Volume} URIs. N.B.
implemenations must be threadsafe. VolumeChooser.equals will be used
  * for internal caching.
+ *
+ * <p>
+ * Implementations may wish to store configuration in Accumulo's system configuration using
the {@link Property#GENERAL_ARBITRARY_PROP_PREFIX}. They may also
+ * benefit from using per-table configuration using {@link Property#TABLE_ARBITRARY_PROP_PREFIX}.
  */
 public interface VolumeChooser {
   String choose(VolumeChooserEnvironment env, String[] options);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f70f5070/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
index ac0819b..1b4e9f5 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
@@ -24,6 +24,7 @@ import java.util.Set;
 import java.util.SortedMap;
 
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
+import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.rpc.ThriftUtil;
@@ -42,6 +43,14 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterables;
 
+/**
+ * This class is responsible for managing the distribution of tablets throughout an Accumulo
cluster. In most cases, users will want a balancer implementation
+ * which ensures a uniform distribution of tablets, so that no individual tablet server is
handling significantly more work than any other.
+ *
+ * <p>
+ * Implementations may wish to store configuration in Accumulo's system configuration using
the {@link Property#GENERAL_ARBITRARY_PROP_PREFIX}. They may also
+ * benefit from using per-table configuration using {@link Property#TABLE_ARBITRARY_PROP_PREFIX}.
+ */
 public abstract class TabletBalancer {
 
   private static final Logger log = LoggerFactory.getLogger(TabletBalancer.class);


Mime
View raw message