incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1177155 - in /incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src: common/hadoop/ common/hadoop/conf.empty/ deb/hadoop/ rpm/hadoop/SPECS/
Date Thu, 29 Sep 2011 02:46:42 GMT
Author: rvs
Date: Thu Sep 29 02:46:42 2011
New Revision: 1177155

URL: http://svn.apache.org/viewvc?rev=1177155&view=rev
Log:
BIGTOP-105. hadoop services can not be started with the default configs in place

Added:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/README
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/core-site.xml
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/hdfs-site.xml
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/mapred-site.xml
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-namenode.postinst
      - copied, changed from r1177144, incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst
Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec

Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/README
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/README?rev=1177155&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/README
(added)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/README
Thu Sep 29 02:46:42 2011
@@ -0,0 +1,4 @@
+A minimum amount of configuration to make Hadoop daemons
+self-contained and useful. It would be really nice if the
+empty  configuration  of  Hadoop  had  the same effect by 
+default (along the lines of hbase-default.xml).

Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/core-site.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/core-site.xml?rev=1177155&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/core-site.xml
(added)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/core-site.xml
Thu Sep 29 02:46:42 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+
+<configuration>
+  <property>
+    <name>fs.default.name</name>
+    <value>hdfs://localhost:8020</value>
+  </property>
+
+  <property>
+     <name>hadoop.tmp.dir</name>
+     <value>/var/lib/hadoop/cache/${user.name}</value>
+  </property>
+</configuration>

Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/hdfs-site.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/hdfs-site.xml?rev=1177155&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/hdfs-site.xml
(added)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/hdfs-site.xml
Thu Sep 29 02:46:42 2011
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+
+<configuration>
+  <property>
+     <name>dfs.name.dir</name>
+     <value>/var/lib/hadoop/cache/hadoop/dfs/name</value>
+  </property>
+</configuration>

Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/mapred-site.xml
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/mapred-site.xml?rev=1177155&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/mapred-site.xml
(added)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/conf.empty/mapred-site.xml
Thu Sep 29 02:46:42 2011
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+
+<configuration>
+  <property>
+    <name>mapred.job.tracker</name>
+    <value>localhost:8021</value>
+  </property>
+</configuration>

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh?rev=1177155&r1=1177154&r2=1177155&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
Thu Sep 29 02:46:42 2011
@@ -190,7 +190,7 @@ for conf in conf.pseudo ; do
   # Install the default configurations
   (cd ${BUILD_DIR}/conf && tar -cf - .) | (cd $ETC_DIR/$conf && tar -xf -)
   # Overlay the -site files
-  (cd $DISTRO_DIR/$conf && tar -cf - .) | (cd $ETC_DIR/$conf && tar -xf -)
+  (cd $DISTRO_DIR/$conf && tar --exclude='.svn' -cf - .) | (cd $ETC_DIR/$conf &&
tar -xf -)
 done
 
 # man pages

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst?rev=1177155&r1=1177154&r2=1177155&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst
Thu Sep 29 02:46:42 2011
@@ -37,16 +37,6 @@ set -e
 case "$1" in
     configure)
         update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.pseudo
30
-        if [ ! -e /etc/hadoop/conf ]; then 
-          ln -s /etc/hadoop/conf.pseudo /etc/hadoop/conf 
-        fi
-        nn_dfs_dir="/var/lib/hadoop/cache/hadoop/dfs"
-        if [ -z "$(ls -A $nn_dfs_dir/name 2>/dev/null)" ]; then
-            mkdir -p $nn_dfs_dir
-            chown hdfs:hadoop $nn_dfs_dir
-            su -s /bin/sh hdfs -c \
-             'hadoop --config /etc/hadoop/conf.pseudo namenode -format' 2>/dev/null 1>/dev/null
|| :
-        fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Copied: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-namenode.postinst
(from r1177144, incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst)
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-namenode.postinst?p2=incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-namenode.postinst&p1=incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst&r1=1177144&r2=1177155&rev=1177155&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-conf-pseudo.postinst
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-namenode.postinst
Thu Sep 29 02:46:42 2011
@@ -36,16 +36,8 @@ set -e
 
 case "$1" in
     configure)
-        update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.pseudo
30
-        if [ ! -e /etc/hadoop/conf ]; then 
-          ln -s /etc/hadoop/conf.pseudo /etc/hadoop/conf 
-        fi
-        nn_dfs_dir="/var/lib/hadoop/cache/hadoop/dfs"
-        if [ -z "$(ls -A $nn_dfs_dir/name 2>/dev/null)" ]; then
-            mkdir -p $nn_dfs_dir
-            chown hdfs:hadoop $nn_dfs_dir
-            su -s /bin/sh hdfs -c \
-             'hadoop --config /etc/hadoop/conf.pseudo namenode -format' 2>/dev/null 1>/dev/null
|| :
+        if [ ! -d /var/lib/hadoop/cache/hadoop/dfs/name ]; then
+            HADOOP_NAMENODE_USER=hdfs hadoop namenode -format 2>/dev/null 1>/dev/null
|| :
         fi
     ;;
 
@@ -62,7 +54,3 @@ esac
 # generated by other debhelper scripts.
 
 #DEBHELPER#
-
-exit 0
-
-

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules?rev=1177155&r1=1177154&r2=1177155&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules Thu Sep 29
02:46:42 2011
@@ -66,7 +66,7 @@ install: build
 	  --doc-dir=debian/tmp/usr/share/doc/hadoop-doc \
 	  --example-dir=debian/tmp/usr/share/doc/hadoop/examples \
 	  --native-build-string=${native_dir} \
-	  --installed-lib-dir=debian/tmp/usr/lib/hadoop
+	  --installed-lib-dir=/usr/lib/hadoop
 
 # Run dh_lintian if we've got it - this doesn't exist on debhelper 6 (eg Ubuntu Hardy)
 	(dh_lintian) || /bin/true

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec?rev=1177155&r1=1177154&r2=1177155&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
Thu Sep 29 02:46:42 2011
@@ -433,6 +433,7 @@ fi
 %{lib_hadoop}/bin/hadoop-daemon.sh \
 %post %1 \
 chkconfig --add %{name}-%1 \
+%2 \
 \
 %preun %1 \
 if [ $1 = 0 ]; then \
@@ -443,7 +444,13 @@ fi \
 if [ $1 -ge 1 ]; then \
   service %{name}-%1 condrestart >/dev/null 2>&1 \
 fi
-%service_macro namenode
+
+%define post_namenode \
+if [ ! -d /var/lib/%{name}/cache/hadoop/dfs/name ]; then \
+   HADOOP_NAMENODE_USER=hdfs hadoop namenode -format 2>/dev/null 1>/dev/null || : \
+fi
+
+%service_macro namenode post_namenode
 %service_macro secondarynamenode
 %service_macro datanode
 %service_macro jobtracker
@@ -453,15 +460,6 @@ fi
 %post conf-pseudo
 %{alternatives_cmd} --install %{config_hadoop} %{name}-conf %{etc_hadoop}/conf.pseudo 30
 
-if [ ! -e %{etc_hadoop}/conf ]; then
-  ln -s %{etc_hadoop}/conf.pseudo %{etc_hadoop}/conf
-fi
-
-nn_dfs_dir="/var/lib/%{name}/cache/hadoop/dfs"
-if [ -z "$(ls -A $nn_dfs_dir 2>/dev/null)" ]; then
-   HADOOP_NAMENODE_USER=hdfs hadoop --config %{etc_hadoop}/conf.pseudo namenode -format 2>/dev/null
1>/dev/null || :
-fi
-
 %files conf-pseudo
 %defattr(-,root,root)
 %config(noreplace) %attr(755,root,root) %{etc_hadoop}/conf.pseudo



Mime
View raw message