This is an automated email from the ASF dual-hosted git repository.
iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 065bb0ea BIGTOP-3861: Support parent directory default configuration
for Hbase rpm (#1048)
065bb0ea is described below
commit 065bb0ea01b7e0a13c23b29f719bcd8a544fcdae
Author: Yu Hou <[email protected]>
AuthorDate: Wed Nov 9 20:52:01 2022 +0800
BIGTOP-3861: Support parent directory default configuration for Hbase rpm
(#1048)
---
bigtop-packages/src/common/hbase/hbase.default | 41 -------------------
bigtop-packages/src/common/hbase/install_hbase.sh | 49 +++++++++++++++++++++++
bigtop-packages/src/deb/hbase/hbase.install | 1 +
bigtop-packages/src/deb/hbase/rules | 1 -
bigtop-packages/src/rpm/hbase/SPECS/hbase.spec | 2 -
5 files changed, 50 insertions(+), 44 deletions(-)
diff --git a/bigtop-packages/src/common/hbase/hbase.default
b/bigtop-packages/src/common/hbase/hbase.default
deleted file mode 100644
index b5371578..00000000
--- a/bigtop-packages/src/common/hbase/hbase.default
+++ /dev/null
@@ -1,41 +0,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.
-
-export HBASE_HOME="/usr/lib/hbase"
-export HBASE_CONF_DIR="/etc/hbase/conf"
-
-export HBASE_PID_DIR="/var/run/hbase"
-export HBASE_LOG_DIR="/var/log/hbase"
-export HBASE_IDENT_STRING=hbase
-
-# Up to 100 region servers can be run on a single host by specifying offsets
-# here or as CLI args when using init scripts. Each offset identifies an
-# instance and is used to determine the network ports it uses. Each instance
-# will have have its own log and pid files.
-#
-# REGIONSERVER_OFFSETS="1 2 3"
-
-#
-# Set the starting port to be assigned for HBASE RS JMX monitoring when
-# running multiple region servers on a node. Each RS will be assigned a JMX
port
-# which will be equal to starting JMX port + offset
-#
-# export JMXPORT=10103
-
-#
-# Set a directory which will be used for Java temp directory. For multi RS the
-# directory will be appended with offset to make it unique for each JVM process
-#
-# export JAVA_TMP_DIR="/tmp/java_tmp_dir"
diff --git a/bigtop-packages/src/common/hbase/install_hbase.sh
b/bigtop-packages/src/common/hbase/install_hbase.sh
index 049f7122..92d35085 100755
--- a/bigtop-packages/src/common/hbase/install_hbase.sh
+++ b/bigtop-packages/src/common/hbase/install_hbase.sh
@@ -178,3 +178,52 @@ install -d -m 0755 $PREFIX/$BIN_DIR
rm -f $PREFIX/$ETC_HBASE/conf.dist/*.cmd
rm -f $PREFIX/$LIB_DIR/bin/*.cmd
+# Install default wrapper
+install -d -m 0755 $PREFIX/$ETC_DEFAULT
+default_hbase_wrapper=$PREFIX/$ETC_DEFAULT/hbase
+cat > $default_hbase_wrapper << EOF
+# 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.
+
+export HBASE_HOME="${LIB_DIR}"
+export HBASE_CONF_DIR="/etc/hbase/conf"
+
+export HBASE_PID_DIR="/var/run/hbase"
+export HBASE_LOG_DIR="/var/log/hbase"
+export HBASE_IDENT_STRING=hbase
+
+# Up to 100 region servers can be run on a single host by specifying offsets
+# here or as CLI args when using init scripts. Each offset identifies an
+# instance and is used to determine the network ports it uses. Each instance
+# will have have its own log and pid files.
+#
+# REGIONSERVER_OFFSETS="1 2 3"
+
+#
+# Set the starting port to be assigned for HBASE RS JMX monitoring when
+# running multiple region servers on a node. Each RS will be assigned a JMX
port
+# which will be equal to starting JMX port + offset
+#
+# export JMXPORT=10103
+
+#
+# Set a directory which will be used for Java temp directory. For multi RS the
+# directory will be appended with offset to make it unique for each JVM process
+#
+# export JAVA_TMP_DIR="/tmp/java_tmp_dir"
+
+EOF
+
+chmod 644 $default_hbase_wrapper
\ No newline at end of file
diff --git a/bigtop-packages/src/deb/hbase/hbase.install
b/bigtop-packages/src/deb/hbase/hbase.install
index 04c77134..065016e3 100644
--- a/bigtop-packages/src/deb/hbase/hbase.install
+++ b/bigtop-packages/src/deb/hbase/hbase.install
@@ -2,3 +2,4 @@
/usr/bin/hbase
/etc/hbase
/etc/security/limits.d/hbase.nofiles.conf
+/etc/default/hbase
diff --git a/bigtop-packages/src/deb/hbase/rules
b/bigtop-packages/src/deb/hbase/rules
index 0c6166c1..dbcf0f8b 100755
--- a/bigtop-packages/src/deb/hbase/rules
+++ b/bigtop-packages/src/deb/hbase/rules
@@ -36,7 +36,6 @@ override_dh_auto_build:
override_dh_auto_install:
- cp debian/hbase.default
debian/${hbase_pkg_name}/etc/default/${hbase_pkg_name}
bash -x debian/install_hbase.sh \
--build-dir=build \
--etc-hbase=/etc/hbase \
diff --git a/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
b/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
index a7008ef2..eaf1c700 100644
--- a/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
+++ b/bigtop-packages/src/rpm/hbase/SPECS/hbase.spec
@@ -98,7 +98,6 @@ Source1: do-component-build
Source2: install_hbase.sh
Source3: hbase.svc
Source4: init.d.tmpl
-Source5: hbase.default
Source6: hbase.nofiles.conf
Source7: regionserver-init.d.tpl
#BIGTOP_PATCH_FILES
@@ -296,7 +295,6 @@ bash %{SOURCE2} \
%__install -d -m 0755 $RPM_BUILD_ROOT/%{initd_dir}/
%__install -d -m 0755 $RPM_BUILD_ROOT/%{etc_default}/
-%__install -m 0644 %{SOURCE5} $RPM_BUILD_ROOT/%{etc_default}/%{name}
%__install -d -m 0755 $RPM_BUILD_ROOT/etc/security/limits.d
%__install -m 0644 %{SOURCE6}
$RPM_BUILD_ROOT/etc/security/limits.d/%{name}.nofiles.conf