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/08/30 00:53:52 UTC

[GitHub] ctubbsii commented on a change in pull request #623: Converted accumulo-site.xml from XML to properties file

ctubbsii commented on a change in pull request #623: Converted accumulo-site.xml from XML to properties file
URL: https://github.com/apache/accumulo/pull/623#discussion_r213875579
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
 ##########
 @@ -110,8 +118,15 @@ private static URL toURL(File f) {
     }
   }
 
-  public static URL getAccumuloSiteLocation() {
-    String configFile = System.getProperty("accumulo.configuration", "accumulo-site.xml");
+  public static URL getAccumuloPropsLocation() {
+
+    URL siteUrl = SiteConfiguration.class.getClassLoader().getResource("accumulo-site.xml");
+    if (siteUrl != null) {
+      throw new IllegalArgumentException("Found deprecated config file 'accumulo-site.xml' on "
+          + "classpath. Since 2.0.0, this file was replaced by 'accumulo.properties'.");
+    }
+
+    String configFile = System.getProperty("accumulo.configuration", "accumulo.properties");
 
 Review comment:
   This seems to imply that the `--props` argument is redundant. It might be confusing if we have too many different ways to do this. Personally, I prefer the `-Daccumulo.configuration=...` method, although perhaps it could be called `-Daccumulo.properties=...` instead for naming consistency and clarity?

----------------------------------------------------------------
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