You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2017/03/30 16:41:38 UTC

[1/2] accumulo git commit: ACCUMULO-4614 AccumuloClassLoader should load accumulo-site.xml from classpath

Repository: accumulo
Updated Branches:
  refs/heads/master 6e3421708 -> 1743ee2e8


ACCUMULO-4614 AccumuloClassLoader should load accumulo-site.xml from classpath

* Removed use of ACCUMULO_CONF_DIR env variable
* Updated accumulo command to no longer require accumulo-site.xml to
  exist in conf dir
* Made minor documentation & comment changes
* Added debug messages to print the path of the accumulo-site.xml that
  was loaded or warn if it was not found on classpath.
* Improved method names in AccumuloClassLoader
* Changed org.apache.accumulo.config.file system property to
  accumulo.configuration which now support support reading from file
  system using file:// prefix


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

Branch: refs/heads/master
Commit: fecc97f4dd405efc1be590fd6f3c560cc6c1f6b8
Parents: b4f86d9
Author: Mike Walch <mw...@apache.org>
Authored: Fri Mar 24 16:03:50 2017 -0400
Committer: Mike Walch <mw...@apache.org>
Committed: Thu Mar 30 12:33:18 2017 -0400

----------------------------------------------------------------------
 INSTALL.md                                      |  5 +-
 assemble/bin/accumulo                           | 10 ++--
 .../org/apache/accumulo/core/conf/Property.java |  2 +-
 .../accumulo/core/conf/SiteConfiguration.java   | 37 ++++++++++---
 .../core/security/crypto/CryptoTest.java        |  1 -
 .../impl/MiniAccumuloClusterImpl.java           |  2 +-
 .../impl/MiniAccumuloConfigImpl.java            |  2 +-
 .../start/classloader/AccumuloClassLoader.java  | 56 ++++++++++++--------
 .../classloader/vfs/AccumuloVFSClassLoader.java |  6 +--
 .../vfs/AccumuloVFSClassLoaderTest.java         |  8 +--
 10 files changed, 79 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/INSTALL.md
----------------------------------------------------------------------
diff --git a/INSTALL.md b/INSTALL.md
index eac6408..ed82fa2 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -31,7 +31,7 @@ to manage Accumulo:
 1. `accumulo` - Runs Accumulo command-line tools and starts Accumulo processes
 2. `accumulo-service` - Runs Accumulo processes as services
 3. `accumulo-cluster` - Manages Accumulo cluster on a single node or several nodes
-4. `accumulo-util` - Accumulo utilities for creating configuration, native libraries, etc.
+4. `accumulo-util` - Accumulo utilities for building native libraries, running jars, etc.
 
 These scripts will be used in the remaining instructions to configure and run Accumulo.
 For convenience, consider adding `accumulo-X.Y.Z/bin/` to your shell's path.
@@ -62,7 +62,7 @@ Follow the steps below to configure `accumulo-env.sh`:
 
 1. Set `HADOOP_PREFIX` and `ZOOKEEPER_HOME` to the location of your Hadoop and Zookeeper
    installations. Accumulo will use these locations to find Hadoop and Zookeeper jars and add
-   them to your `CLASSPATH` variable.  If you you are running a vendor-specific release of
+   them to your `CLASSPATH` variable. If you you are running a vendor-specific release of
    Hadoop or Zookeeper, you may need to modify how the `CLASSPATH` variable is built in
    `accumulo-env.sh`. If Accumulo has problems loading classes when you start it, run 
    `accumulo classpath -d` to debug and print Accumulo's classpath.
@@ -193,4 +193,3 @@ When finished, use the following commands to stop Accumulo:
 [5]: https://code.google.com/p/pdsh/
 [6]: https://code.google.com/p/parallel-ssh/
 [7]: https://www.google.com/search?q=hadoop+passwordless+ssh&ie=utf-8&oe=utf-8
-

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/assemble/bin/accumulo
----------------------------------------------------------------------
diff --git a/assemble/bin/accumulo b/assemble/bin/accumulo
index 6c8b22c..f9e0100 100755
--- a/assemble/bin/accumulo
+++ b/assemble/bin/accumulo
@@ -18,10 +18,10 @@
 function main() {
 
   SOURCE="${BASH_SOURCE[0]}"
-  while [ -h "${SOURCE}" ]; do # resolve $SOURCE until the file is no longer a symlink
+  while [ -h "${SOURCE}" ]; do
      bin="$( cd -P "$( dirname "${SOURCE}" )" && pwd )"
      SOURCE="$(readlink "${SOURCE}")"
-     [[ "${SOURCE}" != /* ]] && SOURCE="${bin}/${SOURCE}" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
+     [[ "${SOURCE}" != /* ]] && SOURCE="${bin}/${SOURCE}"
   done
   # Set up variables needed by accumulo-env.sh
   export bin="$( cd -P "$( dirname "${SOURCE}" )" && pwd )"
@@ -34,13 +34,13 @@ function main() {
     echo "$conf is not a valid directory.  Please make sure it exists"
     exit 1
   fi
-  if [[ ! -f $conf/accumulo-env.sh || ! -f $conf/accumulo-site.xml ]]; then
-    echo "The configuration files 'accumulo-env.sh' & 'accumulo-site.xml' must exist in $conf"
+  if [ ! -f "$conf/accumulo-env.sh" ]; then
+    echo "accumulo-env.sh must exist in $conf"
     exit 1
   fi
   source "$conf/accumulo-env.sh"
 
-  # Might be needed by accumulo-env.sh, accumulo-site.xml, and other Accumulo configuration
+  # Accumulo is moving away from these variables but they still might be needed
   export ACCUMULO_HOME="$basedir"
   export ACCUMULO_CONF_DIR="$conf"
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/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 4472a54..0ec4e29 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
@@ -172,7 +172,7 @@ public enum Property {
       "Properties in this category affect the behavior of accumulo overall, but do not have to be consistent throughout a cloud."),
   @Deprecated
   GENERAL_CLASSPATHS(
-      AccumuloClassLoader.CLASSPATH_PROPERTY_NAME,
+      AccumuloClassLoader.GENERAL_CLASSPATHS,
       "",
       PropertyType.STRING,
       "This property is deprecated as classpath should be configured accumulo-env.sh. A list of all of the places to look for a class. Order does matter, as it will look for the jar "

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
index 753874a..d88a7f0 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
@@ -16,7 +16,12 @@
  */
 package org.apache.accumulo.core.conf;
 
+import java.io.File;
 import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -32,8 +37,8 @@ import org.slf4j.LoggerFactory;
  * An {@link AccumuloConfiguration} which loads properties from an XML file, usually accumulo-site.xml. This implementation supports defaulting undefined
  * property values to a parent configuration's definitions.
  * <p>
- * The system property "org.apache.accumulo.config.file" can be used to specify the location of the XML configuration file on the classpath. If the system
- * property is not defined, it defaults to "accumulo-site.xml".
+ * The system property "accumulo.configuration" can be used to specify the location of the XML configuration file on the classpath or filesystem if the path is
+ * prefixed with 'file://'. If the system property is not defined, it defaults to "accumulo-site.xml" and will look on classpath for file.
  * <p>
  * This class is a singleton.
  * <p>
@@ -94,14 +99,30 @@ public class SiteConfiguration extends AccumuloConfiguration {
   }
 
   synchronized private static Configuration getXmlConfig() {
-    String configFile = System.getProperty("org.apache.accumulo.config.file", "accumulo-site.xml");
     if (xmlConfig == null) {
       xmlConfig = new Configuration(false);
-
-      if (SiteConfiguration.class.getClassLoader().getResource(configFile) == null)
-        log.warn(configFile + " not found on classpath", new Throwable());
-      else
-        xmlConfig.addResource(configFile);
+      String configFile = System.getProperty("accumulo.configuration", "accumulo-site.xml");
+      if (configFile.startsWith("file://")) {
+        try {
+          File f = new File(new URI(configFile));
+          if (f.exists() && !f.isDirectory()) {
+            xmlConfig.addResource(f.toURI().toURL());
+            log.info("Loaded configuration from filesystem at {}", configFile);
+          } else {
+            log.warn("Failed to load Accumulo configuration from " + configFile, new Throwable());
+          }
+        } catch (MalformedURLException | URISyntaxException e) {
+          log.warn("Failed to load Accumulo configuration from " + configFile, e);
+        }
+      } else {
+        URL accumuloConfigUrl = SiteConfiguration.class.getClassLoader().getResource(configFile);
+        if (accumuloConfigUrl == null) {
+          log.warn("Accumulo configuration '" + configFile + "' is not on classpath", new Throwable());
+        } else {
+          xmlConfig.addResource(accumuloConfigUrl);
+          log.info("Loaded configuration from classpath at {}", accumuloConfigUrl.getFile());
+        }
+      }
     }
     return xmlConfig;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java b/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
index 5588029..d738412 100644
--- a/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/security/crypto/CryptoTest.java
@@ -56,7 +56,6 @@ public class CryptoTest {
 
   private static final int MARKER_INT = 0xCADEFEDD;
   private static final String MARKER_STRING = "1 2 3 a b c";
-  public static final String CONFIG_FILE_SYSTEM_PROP = "org.apache.accumulo.config.file";
   public static final String CRYPTO_ON_CONF = "crypto-on-accumulo-site.xml";
   public static final String CRYPTO_OFF_CONF = "crypto-off-accumulo-site.xml";
   public static final String CRYPTO_ON_KEK_OFF_CONF = "crypto-on-no-key-encryption-accumulo-site.xml";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index cf1a901..f56e9ac 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -355,7 +355,7 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster {
       confMap.putAll(config.getSiteConfig());
       confMap.putAll(configOverrides);
       writeConfig(siteFile, confMap.entrySet());
-      jvmOpts.add("-Dorg.apache.accumulo.config.file=" + siteFile.getName());
+      jvmOpts.add("-Daccumulo.configuration=" + siteFile.getName());
     }
 
     if (config.isJDWPEnabled()) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
index 2693c05..316865e 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
@@ -647,7 +647,7 @@ public class MiniAccumuloConfigImpl {
 
     this.existingInstance = Boolean.TRUE;
 
-    System.setProperty("org.apache.accumulo.config.file", "accumulo-site.xml");
+    System.setProperty("accumulo.configuration", "accumulo-site.xml");
     this.hadoopConfDir = hadoopConfDir;
     hadoopConf = new Configuration(false);
     accumuloConf = new Configuration(false);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/start/src/main/java/org/apache/accumulo/start/classloader/AccumuloClassLoader.java
----------------------------------------------------------------------
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 ee611bf..9186312 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
@@ -44,22 +44,34 @@ import org.w3c.dom.NodeList;
 
 public class AccumuloClassLoader {
 
-  public static final String CLASSPATH_PROPERTY_NAME = "general.classpaths";
+  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 String SITE_CONF;
+  private static URL accumuloConfigUrl;
   private static URLClassLoader classloader;
   private static final Logger log = LoggerFactory.getLogger(AccumuloClassLoader.class);
 
   static {
-    String configFile = System.getProperty("org.apache.accumulo.config.file", "accumulo-site.xml");
-    if (System.getenv("ACCUMULO_CONF_DIR") != null) {
-      // accumulo conf dir should be set
-      SITE_CONF = System.getenv("ACCUMULO_CONF_DIR") + "/" + configFile;
+    String configFile = System.getProperty("accumulo.configuration", "accumulo-site.xml");
+    if (configFile.startsWith("file://")) {
+      try {
+        File f = new File(new URI(configFile));
+        if (f.exists() && !f.isDirectory()) {
+          accumuloConfigUrl = f.toURI().toURL();
+        } else {
+          log.warn("Failed to load Accumulo configuration from " + configFile);
+        }
+      } catch (URISyntaxException | MalformedURLException e) {
+        log.warn("Failed to load Accumulo configuration from " + configFile, e);
+      }
     } else {
-      SITE_CONF = null;
+      accumuloConfigUrl = AccumuloClassLoader.class.getClassLoader().getResource(configFile);
+      if (accumuloConfigUrl == null)
+        log.warn("Failed to load Accumulo configuration '{}' from classpath", configFile);
     }
+    if (accumuloConfigUrl != null)
+      log.debug("Using Accumulo configuration at {}", accumuloConfigUrl.getFile());
   }
 
   /**
@@ -69,7 +81,7 @@ public class AccumuloClassLoader {
    * @param d
    *          XMLDocument to search through
    */
-  private static String getAccumuloClassPathStrings(Document d, String propertyName) {
+  private static String getAccumuloProperty(Document d, String propertyName) {
     NodeList pnodes = d.getElementsByTagName("property");
     for (int i = pnodes.getLength() - 1; i >= 0; i--) {
       Element current_property = (Element) pnodes.item(i);
@@ -94,24 +106,21 @@ public class AccumuloClassLoader {
    *          Value to default to if not found.
    * @return site or default class path String
    */
-
-  public static String getAccumuloString(String propertyName, String defaultValue) {
-
+  public static String getAccumuloProperty(String propertyName, String defaultValue) {
+    if (accumuloConfigUrl == null) {
+      log.warn("Using default value '{}' for '{}' as there is no Accumulo configuration on classpath", defaultValue, propertyName);
+      return defaultValue;
+    }
     try {
       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
       DocumentBuilder db = dbf.newDocumentBuilder();
-      String site_classpath_string = null;
-      try {
-        Document site_conf = db.parse(SITE_CONF);
-        site_classpath_string = getAccumuloClassPathStrings(site_conf, propertyName);
-      } catch (Exception e) {
-        /* we don't care because this is optional and we can use defaults */
-      }
-      if (site_classpath_string != null)
-        return site_classpath_string;
+      Document siteDoc = db.parse(accumuloConfigUrl.getFile());
+      String value = getAccumuloProperty(siteDoc, propertyName);
+      if (value != null)
+        return value;
       return defaultValue;
     } catch (Exception e) {
-      throw new IllegalStateException("ClassPath Strings Lookup failed", e);
+      throw new IllegalStateException("Failed to look up property " + propertyName + " in " + accumuloConfigUrl.getFile(), e);
     }
   }
 
@@ -183,9 +192,10 @@ public class AccumuloClassLoader {
   }
 
   private static ArrayList<URL> findAccumuloURLs() throws IOException {
-    String cp = getAccumuloString(AccumuloClassLoader.CLASSPATH_PROPERTY_NAME, null);
+    String cp = getAccumuloProperty(GENERAL_CLASSPATHS, null);
     if (cp == null)
       return new ArrayList<>();
+    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())
@@ -199,7 +209,7 @@ public class AccumuloClassLoader {
   }
 
   private static Set<String> getMavenClasspaths() {
-    String baseDirname = AccumuloClassLoader.getAccumuloString(MAVEN_PROJECT_BASEDIR_PROPERTY_NAME, DEFAULT_MAVEN_PROJECT_BASEDIR_VALUE);
+    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<>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
----------------------------------------------------------------------
diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
index fbc4a99..15ed3ff 100644
--- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
+++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java
@@ -172,7 +172,7 @@ public class AccumuloVFSClassLoader {
   }
 
   private static ReloadingClassLoader createDynamicClassloader(final ClassLoader parent) throws IOException {
-    String dynamicCPath = AccumuloClassLoader.getAccumuloString(DYNAMIC_CLASSPATH_PROPERTY_NAME, DEFAULT_DYNAMIC_CLASSPATH_VALUE);
+    String dynamicCPath = AccumuloClassLoader.getAccumuloProperty(DYNAMIC_CLASSPATH_PROPERTY_NAME, DEFAULT_DYNAMIC_CLASSPATH_VALUE);
 
     ReloadingClassLoader wrapper = () -> parent;
 
@@ -196,7 +196,7 @@ public class AccumuloVFSClassLoader {
             parent = AccumuloClassLoader.getClassLoader();
           }
 
-          FileObject[] vfsCP = resolve(vfs, AccumuloClassLoader.getAccumuloString(VFS_CLASSLOADER_SYSTEM_CLASSPATH_PROPERTY, ""));
+          FileObject[] vfsCP = resolve(vfs, AccumuloClassLoader.getAccumuloProperty(VFS_CLASSLOADER_SYSTEM_CLASSPATH_PROPERTY, ""));
 
           if (vfsCP.length == 0) {
             localLoader = createDynamicClassloader(parent);
@@ -274,7 +274,7 @@ public class AccumuloVFSClassLoader {
   }
 
   private static File computeTopCacheDir() {
-    String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, System.getProperty("java.io.tmpdir"));
+    String cacheDirPath = AccumuloClassLoader.getAccumuloProperty(VFS_CACHE_DIR, System.getProperty("java.io.tmpdir"));
     String procName = ManagementFactory.getRuntimeMXBean().getName();
     return new File(cacheDirPath, "accumulo-vfs-cache-" + procName + "-" + System.getProperty("user.name", "nouser"));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fecc97f4/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
----------------------------------------------------------------------
diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
index c820762..60f76f3 100644
--- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
+++ b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
@@ -79,7 +79,7 @@ public class AccumuloVFSClassLoaderTest {
     out.append("</configuration>\n");
     out.close();
 
-    Whitebox.setInternalState(AccumuloClassLoader.class, "SITE_CONF", conf.toURI().toURL().toString());
+    Whitebox.setInternalState(AccumuloClassLoader.class, "accumuloConfigUrl", conf.toURI().toURL());
     Whitebox.setInternalState(AccumuloVFSClassLoader.class, "lock", new Object());
     ClassLoader acl = AccumuloVFSClassLoader.getClassLoader();
     Assert.assertTrue((acl instanceof VFSClassLoader));
@@ -112,7 +112,7 @@ public class AccumuloVFSClassLoaderTest {
     out.append("</configuration>\n");
     out.close();
 
-    Whitebox.setInternalState(AccumuloClassLoader.class, "SITE_CONF", conf.toURI().toURL().toString());
+    Whitebox.setInternalState(AccumuloClassLoader.class, "accumuloConfigUrl", conf.toURI().toURL());
     Whitebox.setInternalState(AccumuloVFSClassLoader.class, "lock", new Object());
     ClassLoader acl = AccumuloVFSClassLoader.getClassLoader();
     Assert.assertTrue((acl instanceof VFSClassLoader));
@@ -147,7 +147,7 @@ public class AccumuloVFSClassLoaderTest {
     out.append("</configuration>\n");
     out.close();
 
-    Whitebox.setInternalState(AccumuloClassLoader.class, "SITE_CONF", conf.toURI().toURL().toString());
+    Whitebox.setInternalState(AccumuloClassLoader.class, "accumuloConfigUrl", conf.toURI().toURL());
     Whitebox.setInternalState(AccumuloVFSClassLoader.class, "lock", new Object());
     AccumuloVFSClassLoader.getClassLoader();
     FileSystemManager manager = AccumuloVFSClassLoader.generateVfs();
@@ -190,7 +190,7 @@ public class AccumuloVFSClassLoaderTest {
     out.append("</configuration>\n");
     out.close();
 
-    Whitebox.setInternalState(AccumuloClassLoader.class, "SITE_CONF", conf.toURI().toURL().toString());
+    Whitebox.setInternalState(AccumuloClassLoader.class, "accumuloConfigUrl", conf.toURI().toURL());
     Whitebox.setInternalState(AccumuloVFSClassLoader.class, "lock", new Object());
     AccumuloVFSClassLoader.getClassLoader();
     FileSystemManager manager = AccumuloVFSClassLoader.generateVfs();


[2/2] accumulo git commit: Merge branch 'accumulo-site'

Posted by mw...@apache.org.
Merge branch 'accumulo-site'


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

Branch: refs/heads/master
Commit: 1743ee2e844eca014fb44bf64285069a6dfd3b9c
Parents: 6e34217 fecc97f
Author: Mike Walch <mw...@apache.org>
Authored: Thu Mar 30 12:38:55 2017 -0400
Committer: Mike Walch <mw...@apache.org>
Committed: Thu Mar 30 12:38:55 2017 -0400

----------------------------------------------------------------------
 INSTALL.md                                      |  5 +-
 assemble/bin/accumulo                           | 10 ++--
 .../org/apache/accumulo/core/conf/Property.java |  2 +-
 .../accumulo/core/conf/SiteConfiguration.java   | 37 ++++++++++---
 .../core/security/crypto/CryptoTest.java        |  1 -
 .../impl/MiniAccumuloClusterImpl.java           |  2 +-
 .../impl/MiniAccumuloConfigImpl.java            |  2 +-
 .../start/classloader/AccumuloClassLoader.java  | 56 ++++++++++++--------
 .../classloader/vfs/AccumuloVFSClassLoader.java |  6 +--
 .../vfs/AccumuloVFSClassLoaderTest.java         |  8 +--
 10 files changed, 79 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1743ee2e/core/src/main/java/org/apache/accumulo/core/conf/Property.java
----------------------------------------------------------------------