This is an automated email from the ASF dual-hosted git repository. aengineer pushed a commit to branch docker-hadoop-runner-latest in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/docker-hadoop-runner-latest by this push: new 527b43b HDDS-1518. Use /etc/ozone for configuration inside docker-compose. Contributed by Elek, Marton. 527b43b is described below commit 527b43b6041ea2d538054dab4bafd33928f05956 Author: Anu Engineer <aengin...@apache.org> AuthorDate: Thu May 16 15:02:43 2019 +0200 HDDS-1518. Use /etc/ozone for configuration inside docker-compose. Contributed by Elek, Marton. (cherry picked from commit ac814f15b15a0f70cab96fd7262a31477af6e2a8) --- Dockerfile | 4 +++- scripts/envtoconf.py | 4 +++- scripts/starter.sh | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d06cb82..21299df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,9 @@ RUN chown hadoop /opt ADD scripts /opt/ ADD scripts/krb5.conf /etc/ RUN yum install -y krb5-workstation - +RUN mkdir -p /etc/hadoop && mkdir -p /var/log/hadoop && chmod 1777 /etc/hadoop && chmod 1777 /var/log/hadoop +ENV HADOOP_LOG_DIR=/var/log/hadoop +ENV HADOOP_CONF_DIR=/etc/hadoop WORKDIR /opt/hadoop VOLUME /data diff --git a/scripts/envtoconf.py b/scripts/envtoconf.py index ad2e176..0e2c368 100755 --- a/scripts/envtoconf.py +++ b/scripts/envtoconf.py @@ -36,7 +36,7 @@ class Simple(object): self.known_formats = ['xml', 'properties', 'yaml', 'yml', 'env', "sh", "cfg", 'conf'] self.output_dir = self.args.destination - + self.excluded_envs = ['HADOOP_CONF_DIR'] self.configurables = {} def destination_file_path(self, name, extension): @@ -51,6 +51,8 @@ class Simple(object): def process_envs(self): """Process environment variables""" for key in os.environ.keys(): + if key in self.excluded_envs: + continue pattern = re.compile("[_\\.]") parts = pattern.split(key) extension = None diff --git a/scripts/starter.sh b/scripts/starter.sh index 7688ce7..1328607 100755 --- a/scripts/starter.sh +++ b/scripts/starter.sh @@ -99,7 +99,7 @@ fi #To avoid docker volume permission problems sudo chmod o+rwx /data -"$DIR"/envtoconf.py --destination /opt/hadoop/etc/hadoop +"$DIR"/envtoconf.py --destination "${HADOOP_CONF_DIR:-/opt/hadoop/etc/hadoop}" if [ -n "$ENSURE_NAMENODE_DIR" ]; then CLUSTERID_OPTS="" --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org