From commits-return-22183-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Thu Oct 4 19:51:22 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0955D180658 for ; Thu, 4 Oct 2018 19:51:21 +0200 (CEST) Received: (qmail 28892 invoked by uid 500); 4 Oct 2018 17:51:21 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 28877 invoked by uid 99); 4 Oct 2018 17:51:21 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2018 17:51:21 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 9A72885B4C; Thu, 4 Oct 2018 17:51:20 +0000 (UTC) Date: Thu, 04 Oct 2018 17:51:20 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch master updated: Set props path in ConfigOpts. Fixes #676 (#677) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153867548052.4352.3911102696326656452@gitbox.apache.org> From: mmiller@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3b71e1a372f69ce5fe649fcb2224e3318779ee1d X-Git-Newrev: c03b9c4327c51103b4e166dca59079ff30b88868 X-Git-Rev: c03b9c4327c51103b4e166dca59079ff30b88868 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. mmiller pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/master by this push: new c03b9c4 Set props path in ConfigOpts. Fixes #676 (#677) c03b9c4 is described below commit c03b9c4327c51103b4e166dca59079ff30b88868 Author: Mike Miller AuthorDate: Thu Oct 4 13:51:12 2018 -0400 Set props path in ConfigOpts. Fixes #676 (#677) --- .../main/java/org/apache/accumulo/core/cli/ConfigOpts.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java index 07d7c3d..70797d7 100644 --- a/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java +++ b/core/src/main/java/org/apache/accumulo/core/cli/ConfigOpts.java @@ -39,7 +39,10 @@ public class ConfigOpts extends Help { + "The classpath will be searched if this property is not set") private String propsPath; - public String getPropertiesPath() { + public synchronized String getPropertiesPath() { + if (propsPath == null) { + propsPath = SiteConfiguration.getAccumuloPropsLocation().getFile(); + } return propsPath; } @@ -59,12 +62,7 @@ public class ConfigOpts extends Help { public synchronized SiteConfiguration getSiteConfiguration() { if (siteConfig == null) { - if (propsPath != null) { - siteConfig = new SiteConfiguration(new File(propsPath), getOverrides()); - } else { - siteConfig = new SiteConfiguration(SiteConfiguration.getAccumuloPropsLocation(), - getOverrides()); - } + siteConfig = new SiteConfiguration(new File(getPropertiesPath()), getOverrides()); } return siteConfig; }