Commit a35247ce authored by Georgios Ouzounis's avatar Georgios Ouzounis

LAM-49 Changed in apache-hadoop role's tasks for init scripts to work properly.

parent fb490056
......@@ -6,12 +6,12 @@
template: src=yarn-init.j2 dest=/etc/init.d/yarn-init owner=hduser group=lambda mode=0740
- name: Format Apache HDFS.
shell: "yes | {{ installation_path }}/hadoop/bin/hadoop namenode -format"
shell: su - hduser -c "yes | {{ installation_path }}/hadoop/bin/hadoop namenode -format"
tags:
- format-hdfs
- name: Start Apache HDFS.
shell: /etc/init.d/hdfs-init start # Should use Ansible module "service: name=hdfs-init state=started" when the bug in version 1.9.1 is fixed.
shell: su - hduser -c "/etc/init.d/hdfs-init start > /dev/null &"
tags:
- start-hdfs
......@@ -21,7 +21,7 @@
- start-hdfs
- name: Start Apache Yarn.
shell: /etc/init.d/yarn-init start # Should use Ansible module "service: name=yarn-init state=started" when the bug in version 1.9.1 is fixed.
shell: su - hduser -c "/etc/init.d/yarn-init start > /dev/null &"
tags:
- start-yarn
......
......@@ -9,7 +9,7 @@
file: src="{{ installation_path }}/hadoop-{{ version }}" dest="{{ installation_path }}/hadoop" state=link
- name: Set JAVA_HOME in Apache Hadoop environment.
lineinfile: dest="{{ installation_path }}/hadoop/etc/hadoop/hadoop-env.sh" regexp="^export JAVA_HOME=" line="export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64"
lineinfile: dest="{{ installation_path }}/hadoop/etc/hadoop/hadoop-env.sh" regexp="^export JAVA_HOME=" line="export JAVA_HOME=/usr"
- name: Configure slaves.
template: src=slaves.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/slaves" owner=hduser group=lambda mode=0644
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment