You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/05/10 23:38:42 UTC

[GitHub] ctubbsii closed pull request #457: Removing unused properties for #448

ctubbsii closed pull request #457: Removing unused properties for #448
URL: https://github.com/apache/accumulo/pull/457
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 3009975255..fc423acca5 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
@@ -91,11 +91,6 @@
       "NullSecretKeyEncryptionStrategy", PropertyType.STRING,
       "The class Accumulo should use for its key encryption strategy."),
   @Experimental
-  CRYPTO_DEFAULT_KEY_STRATEGY_HDFS_URI("crypto.default.key.strategy.hdfs.uri", "",
-      PropertyType.STRING,
-      "The path relative to the top level instance directory (instance.dfs.dir) where to store"
-          + " the key encryption key within HDFS."),
-  @Experimental
   CRYPTO_DEFAULT_KEY_STRATEGY_KEY_LOCATION("crypto.default.key.strategy.key.location",
       "/crypto/secret/keyEncryptionKey", PropertyType.ABSOLUTEPATH,
       "The path relative to the top level instance directory (instance.dfs.dir) where to store"
@@ -381,16 +376,6 @@
       "if the ports above are in use, search higher ports until one is available"),
   TSERV_CLIENTPORT("tserver.port.client", "9997", PropertyType.PORT,
       "The port used for handling client connections on the tablet servers"),
-  @Deprecated
-  TSERV_MUTATION_QUEUE_MAX("tserver.mutation.queue.max", "1M", PropertyType.BYTES,
-      "This setting is deprecated. See tserver.total.mutation.queue.max. The"
-          + " amount of memory to use to store write-ahead-log mutations-per-session"
-          + " before flushing them. Since the buffer is per write session, consider the"
-          + " max number of concurrent writer when configuring. When using Hadoop 2,"
-          + " Accumulo will call hsync() on the WAL . For a small number of concurrent"
-          + " writers, increasing this buffer size decreases the frequncy of hsync"
-          + " calls. For a large number of concurrent writers a small buffers size is"
-          + " ok because of group commit."),
   TSERV_TOTAL_MUTATION_QUEUE_MAX("tserver.total.mutation.queue.max", "5%", PropertyType.MEMORY,
       "The amount of memory used to store write-ahead-log mutations before flushing them."),
   TSERV_TABLET_SPLIT_FINDMIDPOINT_MAXOPEN("tserver.tablet.split.midpoint.files.max", "300",
@@ -518,8 +503,6 @@
       "The maximum number of threads to use to sort logs during" + " recovery"),
   TSERV_SORT_BUFFER_SIZE("tserver.sort.buffer.size", "10%", PropertyType.MEMORY,
       "The amount of memory to use when sorting logs during recovery."),
-  TSERV_ARCHIVE_WALOGS("tserver.archive.walogs", "false", PropertyType.BOOLEAN,
-      "Keep copies of the WALOGs for debugging purposes"),
   TSERV_WORKQ_THREADS("tserver.workq.threads", "2", PropertyType.COUNT,
       "The number of threads for the distributed work queue. These threads are"
           + " used for copying failed bulk import RFiles."),
@@ -586,16 +569,6 @@
       "The listening port for the monitor's http service"),
   MONITOR_LOG4J_PORT("monitor.port.log4j", "4560", PropertyType.PORT,
       "The listening port for the monitor's log4j logging collection."),
-  @Deprecated
-  MONITOR_BANNER_TEXT("monitor.banner.text", "", PropertyType.STRING,
-      "The banner text displayed on the monitor page."),
-  @Deprecated
-  MONITOR_BANNER_COLOR("monitor.banner.color", "#c4c4c4", PropertyType.STRING,
-      "The color of the banner text displayed on the monitor page."),
-  @Deprecated
-  MONITOR_BANNER_BACKGROUND("monitor.banner.background", "#304065", PropertyType.STRING,
-      "The background color of the banner text displayed on the monitor page."),
-
   MONITOR_SSL_KEYSTORE("monitor.ssl.keyStore", "", PropertyType.PATH,
       "The keystore for enabling monitor SSL."),
   @Sensitive
@@ -621,9 +594,6 @@
 
   MONITOR_LOCK_CHECK_INTERVAL("monitor.lock.check.interval", "5s", PropertyType.TIMEDURATION,
       "The amount of time to sleep between checking for the Montior ZooKeeper lock"),
-  MONITOR_LOG_DATE_FORMAT("monitor.log.date.format", "yyyy/MM/dd HH:mm:ss,SSS", PropertyType.STRING,
-      "The SimpleDateFormat string used to configure "
-          + "the date shown on the 'Recent Logs' monitor page"),
   MONITOR_RESOURCES_EXTERNAL("monitor.resources.external", "", PropertyType.STRING,
       "A JSON Map of Strings. Each String should be an HTML tag of an external"
           + " resource (JS or CSS) to be imported by the Monitor. Be sure to wrap"
@@ -889,12 +859,6 @@
           + " each node with sufficient space. It defaults to"
           + " ${java.io.tmpdir}/accumulo-vfs-cache-${user.name}"),
 
-  @Interpolated
-  @Experimental
-  GENERAL_MAVEN_PROJECT_BASEDIR(AccumuloClassLoader.MAVEN_PROJECT_BASEDIR_PROPERTY_NAME,
-      AccumuloClassLoader.DEFAULT_MAVEN_PROJECT_BASEDIR_VALUE, PropertyType.ABSOLUTEPATH,
-      "Set this to automatically add maven target/classes directories to your dynamic classpath"),
-
   // General properties for configuring replication
   REPLICATION_PREFIX("replication.", null, PropertyType.PREFIX,
       "Properties in this category affect the replication of data to other Accumulo instances."),
@@ -1196,11 +1160,11 @@ public static boolean isValidTablePropertyKey(String key) {
    */
   public static final EnumSet<Property> HOT_PATH_PROPERTIES = EnumSet.of(
       Property.TSERV_CLIENT_TIMEOUT, Property.TSERV_TOTAL_MUTATION_QUEUE_MAX,
-      Property.TSERV_ARCHIVE_WALOGS, Property.GC_TRASH_IGNORE, Property.TSERV_MAJC_DELAY,
-      Property.TABLE_MINC_LOGS_MAX, Property.TSERV_MAJC_MAXCONCURRENT,
-      Property.REPLICATION_WORKER_THREADS, Property.TABLE_DURABILITY, Property.INSTANCE_ZK_TIMEOUT,
-      Property.TABLE_CLASSPATH, Property.MASTER_METADATA_SUSPENDABLE,
-      Property.TABLE_FAILURES_IGNORE, Property.TABLE_SCAN_MAXMEM);
+      Property.GC_TRASH_IGNORE, Property.TSERV_MAJC_DELAY, Property.TABLE_MINC_LOGS_MAX,
+      Property.TSERV_MAJC_MAXCONCURRENT, Property.REPLICATION_WORKER_THREADS,
+      Property.TABLE_DURABILITY, Property.INSTANCE_ZK_TIMEOUT, Property.TABLE_CLASSPATH,
+      Property.MASTER_METADATA_SUSPENDABLE, Property.TABLE_FAILURES_IGNORE,
+      Property.TABLE_SCAN_MAXMEM);
 
   private static final EnumSet<Property> fixedProperties = EnumSet.of(Property.TSERV_CLIENTPORT,
       Property.TSERV_NATIVEMAP_ENABLED, Property.TSERV_SCAN_MAX_OPENFILES,
diff --git a/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java b/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java
index 3591ae195d..5351c96904 100644
--- a/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java
@@ -101,12 +101,6 @@ public void testRawDefaultValues() {
         conf.get(Property.VFS_CLASSLOADER_CACHE_DIR));
   }
 
-  @Test
-  public void testGetDefaultValue_AbsolutePath() {
-    // should not expand because default is ""
-    assertEquals("", Property.GENERAL_MAVEN_PROJECT_BASEDIR.getDefaultValue());
-  }
-
   // This test verifies all "sensitive" properties are properly marked as sensitive
   @Test
   public void testSensitiveKeys() {
diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
index 68fd757751..3a1b4e04f6 100644
--- a/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
+++ b/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
@@ -25,10 +25,7 @@
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -45,8 +42,6 @@
 public class AccumuloClassLoader {
 
   public static final String GENERAL_CLASSPATHS = "general.classpaths";
-  public static final String MAVEN_PROJECT_BASEDIR_PROPERTY_NAME = "general.maven.project.basedir";
-  public static final String DEFAULT_MAVEN_PROJECT_BASEDIR_VALUE = "";
 
   private static URL accumuloConfigUrl;
   private static URLClassLoader classloader;
@@ -206,8 +201,6 @@ public boolean accept(File dir, String name) {
     log.warn("'{}' is deprecated but was set to '{}' ", GENERAL_CLASSPATHS, cp);
     String[] cps = replaceEnvVars(cp, System.getenv()).split(",");
     ArrayList<URL> urls = new ArrayList<>();
-    for (String classpath : getMavenClasspaths())
-      addUrl(classpath, urls);
     for (String classpath : cps) {
       if (!classpath.startsWith("#")) {
         addUrl(classpath, urls);
@@ -216,32 +209,6 @@ public boolean accept(File dir, String name) {
     return urls;
   }
 
-  private static Set<String> getMavenClasspaths() {
-    String baseDirname = AccumuloClassLoader.getAccumuloProperty(
-        MAVEN_PROJECT_BASEDIR_PROPERTY_NAME, DEFAULT_MAVEN_PROJECT_BASEDIR_VALUE);
-    if (baseDirname == null || baseDirname.trim().isEmpty())
-      return Collections.emptySet();
-    Set<String> paths = new TreeSet<>();
-    findMavenTargetClasses(paths, new File(baseDirname.trim()), 0);
-    return paths;
-  }
-
-  private static void findMavenTargetClasses(Set<String> paths, File file, int depth) {
-    if (depth > 3)
-      return;
-    if (file.isDirectory()) {
-      File[] children = file.listFiles();
-      if (children != null) {
-        for (File child : children) {
-          findMavenTargetClasses(paths, child, depth + 1);
-        }
-      }
-    } else if ("pom.xml".equals(file.getName())) {
-      paths.add(file.getParentFile().getAbsolutePath() + File.separator + "target" + File.separator
-          + "classes");
-    }
-  }
-
   public static synchronized ClassLoader getClassLoader() throws IOException {
     if (classloader == null) {
       ArrayList<URL> urls = findAccumuloURLs();
diff --git a/test/src/main/java/org/apache/accumulo/test/MetaRecoveryIT.java b/test/src/main/java/org/apache/accumulo/test/MetaRecoveryIT.java
index 338c1436a3..e3178d77dd 100644
--- a/test/src/main/java/org/apache/accumulo/test/MetaRecoveryIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/MetaRecoveryIT.java
@@ -49,7 +49,6 @@ protected void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSit
     hadoopCoreSite.set("fs.file.impl", RawLocalFileSystem.class.getName());
     cfg.setProperty(Property.GC_CYCLE_DELAY, "1s");
     cfg.setProperty(Property.GC_CYCLE_START, "1s");
-    cfg.setProperty(Property.TSERV_ARCHIVE_WALOGS, "true");
     cfg.setProperty(Property.INSTANCE_ZK_TIMEOUT, "15s");
     cfg.setProperty(Property.TSERV_WALOG_MAX_SIZE, "1048576");
   }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services