aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Boudnik <konstantin_boudnik@epam.com>2017-06-09 16:45:15 -0700
committerKonstantin Boudnik <konstantin_boudnik@epam.com>2017-06-10 23:15:59 -0700
commitc4764966c97d96514302f8533b2afcca133075e0 (patch)
tree406eb6a3ed37b829a64a3693b0fbc6fb89af6f28
parente489faa631d3d3c199e7186c0d64ce09e6acb1e5 (diff)
BIGTOP-2165. ignite-hadoop service doesn't start
-rw-r--r--bigtop-deploy/puppet/modules/ignite_hadoop/templates/default-config.xml27
-rw-r--r--bigtop-packages/src/common/ignite-hadoop/ignite-hadoop.default2
-rw-r--r--bigtop-packages/src/rpm/ignite-hadoop/SPECS/ignite-hadoop.spec15
3 files changed, 25 insertions, 19 deletions
diff --git a/bigtop-deploy/puppet/modules/ignite_hadoop/templates/default-config.xml b/bigtop-deploy/puppet/modules/ignite_hadoop/templates/default-config.xml
index bfaee60e..9d8fc1e0 100644
--- a/bigtop-deploy/puppet/modules/ignite_hadoop/templates/default-config.xml
+++ b/bigtop-deploy/puppet/modules/ignite_hadoop/templates/default-config.xml
@@ -117,20 +117,23 @@
<property name="host" value="0.0.0.0" />
<property name="port" value="10500" />
</bean>
- </property>
-
- <!-- Sample secondary file system configuration.
- 'uri' - the URI of the secondary file system.
- 'cfgPath' - optional configuration path of the secondary file system,
- e.g. /opt/foo/core-site.xml. Typically left to be null.
- 'userName' - optional user name to access the secondary file system on behalf of. Use it
- if Hadoop client and the Ignite node are running on behalf of different users.
- -->
+ </property>
<property name="secondaryFileSystem">
<bean class="org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem">
- <constructor-arg name="uri" value='hdfs://<%= @hadoop_head_node %>:<%= @hadoop_namenode_port %>'/>
- <constructor-arg name="cfgPath"><null/></constructor-arg>
- <constructor-arg name="userName" value="ignite"/>
+ <property name="fileSystemFactory">
+ <bean class="org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory">
+ <!-- ATTN: The trailing slash in the url is very important work around for a bug
+ in the Ignite's URL parsing logic. It might get fixed in Ignite 2.1, though
+ See https://is.gd/8c2LQY for more info -->
+ <property name="uri" value='hdfs://<%= @hadoop_head_node %>:<%= @hadoop_namenode_port %>/'/>
+ <property name="configPaths">
+ <list>
+ <value>/etc/hadoop/conf/core-site.xml</value>
+ </list>
+ </property>
+ </bean>
+ </property>
+ <property name="defaultUserName" value="ignite"/>
</bean>
</property>
</bean>
diff --git a/bigtop-packages/src/common/ignite-hadoop/ignite-hadoop.default b/bigtop-packages/src/common/ignite-hadoop/ignite-hadoop.default
index 87626d63..a0947203 100644
--- a/bigtop-packages/src/common/ignite-hadoop/ignite-hadoop.default
+++ b/bigtop-packages/src/common/ignite-hadoop/ignite-hadoop.default
@@ -20,3 +20,5 @@ export IGNITE_PID_DIR="/var/run/ignite-hadoop"
export IGNITE_LOG_DIR="/var/log/ignite-hadoop"
export IGNITE_WORK_DIR="/var/run/ignite-hadoop/work"
export IGNITE_IDENT_STRING=ignite
+
+export HADOOP_HOME=${HADOOP_HOME:-/usr/lib/hadoop}
diff --git a/bigtop-packages/src/rpm/ignite-hadoop/SPECS/ignite-hadoop.spec b/bigtop-packages/src/rpm/ignite-hadoop/SPECS/ignite-hadoop.spec
index 1d621c6b..b360b0a5 100644
--- a/bigtop-packages/src/rpm/ignite-hadoop/SPECS/ignite-hadoop.spec
+++ b/bigtop-packages/src/rpm/ignite-hadoop/SPECS/ignite-hadoop.spec
@@ -22,6 +22,7 @@
%define pids_ignite %{ignite_home}/pids
%define man_dir %{_mandir}
%define ignite_username ignite
+%define service_name %{name}-service
%define vcs_tag %{ignite_hadoop_version}
%if %{?suse_version:1}0
@@ -163,8 +164,8 @@ ln -s %{_localstatedir}/log/%{name} %{buildroot}/%{logs_ignite}
%__install -d -m 0755 %{buildroot}/%{_localstatedir}/run/%{name}
ln -s %{_localstatedir}/run/%{name} %{buildroot}/%{pids_ignite}
-init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}
-bash %{SOURCE4} ${RPM_SOURCE_DIR}/ignite.svc rpm $init_file
+init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{service_name}
+bash %{SOURCE4} ${RPM_SOURCE_DIR}/ignite-hadoop.svc rpm $init_file
chmod 755 $init_file
%__install -d -m 0755 $RPM_BUILD_ROOT/usr/bin
@@ -204,17 +205,17 @@ fi
%define service_macro() \
%files %1 \
-%attr(0755,root,root)/%{initd_dir}/%{name} \
+%attr(0755,root,root)/%{initd_dir}/%{service_name} \
%post %1 \
-chkconfig --add %{name} \
+chkconfig --add %{service_name} \
\
%preun %1 \
if [ $1 = 0 ] ; then \
- service %{name} stop > /dev/null 2>&1 \
- chkconfig --del %{name} \
+ service %{service_name} stop > /dev/null 2>&1 \
+ chkconfig --del %{service_name} \
fi \
%postun %1 \
if [ $1 -ge 1 ]; then \
- service %{name} condrestart >/dev/null 2>&1 \
+ service %{service_name} condrestart >/dev/null 2>&1 \
fi
%service_macro service