Updated Branches:
  refs/heads/master 09d0c4c46 -> 50f48eca2

GTOP-239. HBase init scripts are shut down in the wrong order


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/50f48eca
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/50f48eca
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/50f48eca

Branch: refs/heads/master
Commit: 50f48eca296213bb9c8e97145a0244bf224cfdda
Parents: 09d0c4c
Author: Plamen Jeliazkov <[email protected]>
Authored: Thu Apr 11 10:43:29 2013 -0700
Committer: Konstantin Boudnik <[email protected]>
Committed: Thu Apr 11 10:43:29 2013 -0700

----------------------------------------------------------------------
 .../src/deb/hbase/install_init_scripts.sh          |    9 ++++++++-
 bigtop-packages/src/deb/hbase/service-init.d.tpl   |    7 +++++--
 bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh     |   13 ++++++++-----
 .../src/rpm/hbase/SOURCES/hbase.sh.suse            |    7 +++++--
 bigtop-packages/src/rpm/hbase/SPECS/hbase.spec     |    8 ++++++++
 5 files changed, 34 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/50f48eca/bigtop-packages/src/deb/hbase/install_init_scripts.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hbase/install_init_scripts.sh 
b/bigtop-packages/src/deb/hbase/install_init_scripts.sh
index e4691e3..f60059c 100755
--- a/bigtop-packages/src/deb/hbase/install_init_scripts.sh
+++ b/bigtop-packages/src/deb/hbase/install_init_scripts.sh
@@ -17,12 +17,19 @@
 
 SRC_PKG=hbase
 for node in master regionserver rest thrift ; do
+    case $service in
+        master) chkconfig="2345 85 15" ;;
+        thrift) chkconfig="2345 86 14" ;;
+        regionserver) chkconfig="2345 87 13" ;;
+        rest) chkconfig="2345 88 12" ;;
+        *) chkconfig="2345 89 13" ;;
+    esac
     service_pkgdir=debian/$SRC_PKG-$node
     debdir=$service_pkgdir/DEBIAN
     template="debian/service-init.d.tpl"
 
     mkdir -p $service_pkgdir/etc/init.d/ $debdir
-    sed -e "s|@HBASE_DAEMON@|$node|" $template > 
$service_pkgdir/etc/init.d/$SRC_PKG-$node
+    sed -e "s|@HBASE_DAEMON@|$node|" -e "s|@CHKCONFIG@|$chkconfig|" $template 
> $service_pkgdir/etc/init.d/$SRC_PKG-$node
     sed -e "s|@HBASE_DAEMON@|$node|" debian/service-postinst.tpl > 
$debdir/postinst
     sed -e "s|@HBASE_DAEMON@|$node|" debian/service-postrm.tpl > $debdir/postrm
     echo /etc/init.d/$SRC_PKG-$node > $debdir/conffiles

http://git-wip-us.apache.org/repos/asf/bigtop/blob/50f48eca/bigtop-packages/src/deb/hbase/service-init.d.tpl
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/deb/hbase/service-init.d.tpl 
b/bigtop-packages/src/deb/hbase/service-init.d.tpl
index db9c2b3..9260c71 100644
--- a/bigtop-packages/src/deb/hbase/service-init.d.tpl
+++ b/bigtop-packages/src/deb/hbase/service-init.d.tpl
@@ -25,8 +25,11 @@
 #
 # Version:  @(#)skeleton  1.9  26-Feb-2001  [email protected]
 #
-# chkconfig: 2345 87 13
-# description: Summary: HBase is the Hadoop database. Use it when you need 
random, realtime read/write access to your Big Data. This project's goal is the 
hosting of very large tables -- billions of rows X millions of columns -- atop 
clusters of commodity hardware.
+# chkconfig: @CHKCONFIG@
+# description: Summary: HBase is the Hadoop database. Use it when you
+# need random, realtime read/write access to your Big Data. This project's
+# goal is the hosting of very large tables -- billions of rows X millions
+# of columns -- atop clusters of commodity hardware.
 # processname: HBase
 #
 ### BEGIN INIT INFO

http://git-wip-us.apache.org/repos/asf/bigtop/blob/50f48eca/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh 
b/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh
index b33d7e4..3cdcea4 100755
--- a/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh
+++ b/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh
@@ -14,9 +14,12 @@
 # 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.
-# 
-# chkconfig: 2345 87 13
-# description: Summary: HBase is the Hadoop database. Use it when you need 
random, realtime read/write access to your Big Data. This project's goal is the 
hosting of very large tables -- billions of rows X millions of columns -- atop 
clusters of commodity hardware.
+#
+# chkconfig: @CHKCONFIG@
+# description: Summary: HBase is the Hadoop database. Use it when you
+# need random, realtime read/write access to your Big Data. This project's
+# goal is the hosting of very large tables -- billions of rows X millions
+# of columns -- atop clusters of commodity hardware.
 # processname: HBase
 # pidfile: /usr/lib/hbase/pids/hadoop_hbase.pid
 ### BEGIN INIT INFO
@@ -25,8 +28,8 @@
 # Required-Stop:
 # Should-Start:      $named
 # Should-Stop:
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
 # Short-Description: HBase
 ### END INIT INFO
 set -e

http://git-wip-us.apache.org/repos/asf/bigtop/blob/50f48eca/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh.suse
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh.suse 
b/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh.suse
index 9fe8025..5452e00 100644
--- a/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh.suse
+++ b/bigtop-packages/src/rpm/hbase/SOURCES/hbase.sh.suse
@@ -17,8 +17,11 @@
 #
 # Starts a HBase @HBASE_DAEMON@
 #
-# chkconfig: 345 87 13
-# description: Summary: HBase is the Hadoop database. Use it when you need 
random, realtime read/write access to your Big Data. This project's goal is the 
hosting of very large tables -- billions of rows X millions of columns -- atop 
clusters of commodity hardware.
+# chkconfig: @CHKCONFIG@
+# description: Summary: HBase is the Hadoop database. Use it when you
+# need random, realtime read/write access to your Big Data. This project's
+# goal is the hosting of very large tables -- billions of rows X millions
+# of columns -- atop clusters of commodity hardware.
 # processname: HBase
 #
 ### BEGIN INIT INFO

http://git-wip-us.apache.org/repos/asf/bigtop/blob/50f48eca/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec 
b/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
index 58f32bc..6d793c1 100644
--- a/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
+++ b/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
@@ -266,8 +266,16 @@ orig_init_file=%{SOURCE3}
 
 for service in %{hbase_services}
 do
+  case $service in
+    master) chkconfig="345 85 15" ;;
+    thrift) chkconfig="345 86 14" ;;
+    regionserver) chkconfig="345 87 13" ;;
+    rest) chkconfig="345 88 12" ;;
+    *) chkconfig="345 89 13" ;;
+  esac
        init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-${service}
        %__cp $orig_init_file $init_file
+       %__sed -i -e "s|@CHKCONFIG@|${chkconfig}|" $init_file
        %__sed -i -e "s|@HBASE_DAEMON@|${service}|" $init_file
        chmod 755 $init_file
 done

Reply via email to