diff --git a/boostkit-hbase-hindex.tar.gz b/boostkit-hbase-hindex.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f0e62479ab2c14707055a77636362cab042b0260 Binary files /dev/null and b/boostkit-hbase-hindex.tar.gz differ diff --git a/boostkit-hbase-tries-index.tar.gz b/boostkit-hbase-tries-index.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7b0779ac108487eb9f324f1caeb400ec52f6517b Binary files /dev/null and b/boostkit-hbase-tries-index.tar.gz differ diff --git a/boostkit-hbase.spec b/boostkit-hbase.spec new file mode 100644 index 0000000000000000000000000000000000000000..a472b8d25415e07233b70fd05ac103186c2627d5 --- /dev/null +++ b/boostkit-hbase.spec @@ -0,0 +1,92 @@ +%global debug_package %{nil} +%define version_hbase 1.0.1 + +Summary: Kunpeng BoostKit toolkit for Hbase +Name: boostkit-hbase +Version: 1.0.1 +Release: 1 +License: Apache License 2.0 +URL: https://www.hikunpeng.com/zh/developer/boostkit/big-data +#Source0: boostkit-hbase-tries-index.tar.gz +Source1: boostkit-hbase-hindex.tar.gz +ExclusiveArch: aarch64 + +%description +Kunpeng BoostKit toolkit for Hbase + +%prep + + +%build + +%install +rm -rf %{buildroot}/opt/hbase +mkdir -p %{buildroot}/opt/hbase +#cp -rf %{SOURCE0} %{buildroot}/opt/hbase +cp -rf %{SOURCE1} %{buildroot}/opt/hbase + +%post +if [ -n "${HBASE_HOME}" ];then + cd /opt/hbase + #tar -zxvf boostkit-hbase-tries-index.tar.gz + tar -zxvf boostkit-hbase-hindex.tar.gz + tar -xvf boostkit-hbase-index-1.0.0-aarch64.tar.gz + #mv ${HBASE_HOME}/lib ${HBASE_HOME}/lib-old + #cp -rf /opt/hbase/lib ${HBASE_HOME}/ + #cp -rf /opt/hbase/BoostKit-tries-index_%{version_hbase}.zip ${HBASE_HOME}/lib + cp -rf /opt/hbase/boostkit-hbase-index-1.0.0-aarch64.jar ${HBASE_HOME}/lib + cp -rf /opt/hbase/boostkit-hbase-index-client-1.0.0-aarch64.jar ${HBASE_HOME}/lib + #cp -rf /opt/hbase/hbase-site-install.txt ${HBASE_HOME}/conf + #cp -rf /opt/hbase/install-site.sh ${HBASE_HOME}/conf + cp -rf /opt/hbase/hbase-index-install.txt ${HBASE_HOME}/conf + cp -rf /opt/hbase/install-index.sh ${HBASE_HOME}/conf + #cd ${HBASE_HOME}/lib + #unzip BoostKit-tries-index_%{version_hbase}.zip + cd ${HBASE_HOME}/conf + cp hbase-site.xml hbase-site.xml-old-config + sh install-site.sh + sh install-index.sh + #rm -rf ${HBASE_HOME}/conf/install-site.sh + rm -rf ${HBASE_HOME}/conf/install-index.sh + rm -rf ${HBASE_HOME}/conf/hbase-index-install.txt + #rm -rf ${HBASE_HOME}/conf/hbase-site-install.txt + #echo "===========The original lib file of Hbase has been backed up as lib-old==========" + echo "===========The original hbase-site.xml file of Hbase has been backed up as hbase-site.xml-old-config==========" + echo "===========The hbase-global-secondary-index command takes effect after restart==========" +else + echo "======Hbase is not installed in the environment======" + echo "======Go to yum remove boostkit-hbase.aarch64======" + echo "======Install hbase first======" + echo "======Write the HBASE_HOME environment variable to /etc/profile======" + exit 1 +fi + + +%postun +if [ -n "${HBASE_HOME}" ];then + #rm -rf ${HBASE_HOME}/lib/ + #mv ${HBASE_HOME}/lib-old ${HBASE_HOME}/lib + rm -rf ${HBASE_HOME}/lib/boostkit-hbase-index-1.0.0-aarch64.jar + rm -rf ${HBASE_HOME}/lib/boostkit-hbase-index-client-1.0.0-aarch64.jar + rm -rf ${HBASE_HOME}/conf/hbase-site.xml + mv ${HBASE_HOME}/conf/hbase-site.xml-old-config ${HBASE_HOME}/conf/hbase-site.xml + #echo "===========The tries-index lib file of Hbase has been backed up as lib-tries-index-bak==========" + #echo "===========The tries-index hbase-site.xml file of Hbase has been backed up as hbase-site.xml-tries-index-bak==========" + #echo "===========After habse-tries-index is uninstalled, replace the backed lib package==========" + echo "===========After habse-tries-index is uninstalled, replace the backed hbase-site.xml configuration file==========" +fi + +%files +/opt/hbase + + + +%changelog +* Fri Jan 26 2024 qijiawei - 1.0.1-1 +- comment tries-index part, add global-secondary-index part + +* Mon May 29 2023 yanghaitao - 1.0.0-1 +- update spec file + +* Fri May 26 2023 yanghaitao - 1.0.0-1 +- init Kunpeng BoostKit tries-index package for Hbase