You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ae...@apache.org on 2019/06/11 18:07:26 UTC

[hadoop] branch docker-hadoop-runner-jdk11 updated: HDDS-1630. Copy default configuration files to the writeable directory (#888)

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

aengineer pushed a commit to branch docker-hadoop-runner-jdk11
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/docker-hadoop-runner-jdk11 by this push:
     new 3f6d7a6  HDDS-1630. Copy default configuration files to the writeable directory (#888)
3f6d7a6 is described below

commit 3f6d7a6ce2236292a2d044b5c3c80bdec28b2922
Author: Elek, Márton <el...@users.noreply.github.com>
AuthorDate: Tue Jun 11 20:07:12 2019 +0200

    HDDS-1630. Copy default configuration files to the writeable directory (#888)
---
 scripts/starter.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/scripts/starter.sh b/scripts/starter.sh
index 6b5bbe2..30ec55f 100755
--- a/scripts/starter.sh
+++ b/scripts/starter.sh
@@ -96,7 +96,19 @@ if [ -n "$KERBEROS_ENABLED" ]; then
     sed "s/SERVER/$KERBEROS_SERVER/g" "$DIR"/krb5.conf | sudo tee /etc/krb5.conf
 fi
 
-"$DIR"/envtoconf.py --destination "${HADOOP_CONF_DIR:-/opt/hadoop/etc/hadoop}"
+
+CONF_DESTINATION_DIR="${HADOOP_CONF_DIR:-/opt/hadoop/etc/hadoop}"
+
+#Try to copy the defaults
+set +e
+if [[ -d "/opt/ozone/etc/hadoop" ]]; then
+   cp /opt/hadoop/etc/hadoop/* "$CONF_DESTINATION_DIR/" > /dev/null 2>&1
+elif [[ -d "/opt/hadoop/etc/hadoop" ]]; then
+   cp /opt/hadoop/etc/hadoop/* "$CONF_DESTINATION_DIR/" > /dev/null 2>&1
+fi
+set -e
+
+"$DIR"/envtoconf.py --destination "$CONF_DESTINATION_DIR"
 
 if [ -n "$ENSURE_NAMENODE_DIR" ]; then
   CLUSTERID_OPTS=""


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org