You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fluo.apache.org by kt...@apache.org on 2018/08/14 15:59:51 UTC

[fluo-uno] branch master updated: Use conf/uno-local.conf if it exists (#188)

This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fluo-uno.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e067e1  Use conf/uno-local.conf if it exists (#188)
8e067e1 is described below

commit 8e067e1b3998c43ebf9b0cb6163af80ddcc5826c
Author: Keith Turner <ke...@deenlo.com>
AuthorDate: Tue Aug 14 11:59:49 2018 -0400

    Use conf/uno-local.conf if it exists (#188)
---
 README.md            | 10 ++++++++++
 bin/impl/load-env.sh |  4 +++-
 conf/.gitignore      |  1 +
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index d290902..6888056 100644
--- a/README.md
+++ b/README.md
@@ -72,6 +72,16 @@ your environment. Inside this script the variable `UNO_HOME` defaults to the roo
 vim conf/uno.conf
 ```
 
+If you would like to avoid modifying `uno.conf` because it is managed by git,
+there is a second way to configure uno.  If `conf/uno-local.conf` exists then
+it is used instead of `uno.conf`.  After pulling the latest changes to
+Uno, a tool like meld can be used to compare `uno.conf` and `uno-local.conf`.
+
+```bash
+cp conf/uno.conf conf/uno-local.conf
+vim conf/uno-local.conf
+```
+
 All commands are run using the `uno` script in `bin/`. Uno has a command that helps you configure
 your shell so that you can run commands from any directory and easily set common environment
 variables in your shell for Uno, Hadoop, ZooKeeper, Fluo, and Spark. Run the following command to
diff --git a/bin/impl/load-env.sh b/bin/impl/load-env.sh
index 6b579a7..b828f9e 100755
--- a/bin/impl/load-env.sh
+++ b/bin/impl/load-env.sh
@@ -42,7 +42,9 @@ AH=$ACCUMULO_HOME
 FH=$FLUO_HOME
 
 # Load env configuration
-if [[ -f "$UNO_HOME/conf/uno.conf" ]]; then
+if [[ -f "$UNO_HOME/conf/uno-local.conf" ]]; then
+  source "$UNO_HOME"/conf/uno-local.conf
+elif [[ -f "$UNO_HOME/conf/uno.conf" ]]; then
   source "$UNO_HOME"/conf/uno.conf
 else
   echo "ERROR: Configuration file $UNO_HOME/conf/uno.conf does not exist" 1>&2
diff --git a/conf/.gitignore b/conf/.gitignore
new file mode 100644
index 0000000..ad8378f
--- /dev/null
+++ b/conf/.gitignore
@@ -0,0 +1 @@
+uno-local.conf