accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [6/6] accumulo git commit: Merge branch '1.8'
Date Fri, 09 Jun 2017 03:22:21 GMT
Merge branch '1.8'


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

Branch: refs/heads/master
Commit: 5956d45695c3aef6d97335b4ba0fddd4b018aa51
Parents: 39efb48 da695f6
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Thu Jun 8 23:21:50 2017 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Jun 8 23:21:50 2017 -0400

----------------------------------------------------------------------
 .../accumulo/core/conf/SiteConfiguration.java   | 20 +++++---------------
 .../accumulo/core/file/rfile/PrintInfo.java     |  4 +---
 .../core/file/rfile/bcfile/PrintInfo.java       |  3 +--
 .../server/conf/ServerConfigurationFactory.java |  2 +-
 .../java/org/apache/accumulo/shell/Shell.java   |  6 +++---
 .../apache/accumulo/shell/ShellOptionsJC.java   |  3 +--
 .../accumulo/shell/commands/FateCommand.java    |  3 +--
 .../apache/accumulo/test/util/CertUtils.java    |  4 ++--
 8 files changed, 15 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5956d456/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
index d88a7f0,9f047e2..213a895
--- a/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
@@@ -94,35 -84,15 +88,31 @@@ public class SiteConfiguration extends 
      return instance;
    }
  
-   synchronized public static SiteConfiguration getInstance() {
-     return getInstance(DefaultConfiguration.getInstance());
-   }
- 
    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/5956d456/core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5956d456/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
----------------------------------------------------------------------
diff --cc server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
index 02a8301,f79f707..65451a6
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
@@@ -102,7 -119,8 +102,7 @@@ public class ServerConfigurationFactor
  
    public synchronized SiteConfiguration getSiteConfiguration() {
      if (siteConfig == null) {
-       siteConfig = SiteConfiguration.getInstance(getDefaultConfiguration());
 -      checkPermissions();
+       siteConfig = SiteConfiguration.getInstance();
      }
      return siteConfig;
    }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5956d456/shell/src/main/java/org/apache/accumulo/shell/Shell.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5956d456/shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java
----------------------------------------------------------------------
diff --cc shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java
index d43d4e3,9f8ee09..8d97c68
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java
@@@ -32,9 -30,9 +32,8 @@@ import java.util.Set
  import org.apache.accumulo.core.Constants;
  import org.apache.accumulo.core.client.Instance;
  import org.apache.accumulo.core.conf.AccumuloConfiguration;
- import org.apache.accumulo.core.conf.DefaultConfiguration;
  import org.apache.accumulo.core.conf.Property;
  import org.apache.accumulo.core.conf.SiteConfiguration;
 -import org.apache.accumulo.core.util.Base64;
  import org.apache.accumulo.core.zookeeper.ZooUtil;
  import org.apache.accumulo.fate.AdminUtil;
  import org.apache.accumulo.fate.ReadOnlyRepo;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5956d456/test/src/main/java/org/apache/accumulo/test/util/CertUtils.java
----------------------------------------------------------------------


Mime
View raw message