mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Remove -metrika-yandex postfix from package names (#377)
This commit is contained in:
parent
38040f5323
commit
1adf0bb3e1
@ -6,7 +6,7 @@
|
|||||||
# Будет создан init.d скрипт с названием divider для демона (бинарника) Divider
|
# Будет создан init.d скрипт с названием divider для демона (бинарника) Divider
|
||||||
|
|
||||||
macro (create_init_script daemonname)
|
macro (create_init_script daemonname)
|
||||||
set (filename ${daemonname}-metrika-yandex)
|
set (filename ${daemonname})
|
||||||
# Опционально принимаем filename вторым аргументом.
|
# Опционально принимаем filename вторым аргументом.
|
||||||
set (extra_args ${ARGN})
|
set (extra_args ${ARGN})
|
||||||
list (LENGTH extra_args num_extra_args)
|
list (LENGTH extra_args num_extra_args)
|
||||||
|
@ -18,8 +18,8 @@ echo 'Inserting without increment.txt'
|
|||||||
echo "2014-01-01 41" | clickhouse-client --query="INSERT INTO increment.a FORMAT TabSeparated"
|
echo "2014-01-01 41" | clickhouse-client --query="INSERT INTO increment.a FORMAT TabSeparated"
|
||||||
ls /opt/clickhouse/data/increment/a/
|
ls /opt/clickhouse/data/increment/a/
|
||||||
cat /opt/clickhouse/data/increment/a/increment.txt
|
cat /opt/clickhouse/data/increment/a/increment.txt
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex stop
|
sudo /etc/init.d/clickhouse-server stop
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex start
|
sudo /etc/init.d/clickhouse-server start
|
||||||
sleep 10s
|
sleep 10s
|
||||||
ls /opt/clickhouse/data/increment/a/
|
ls /opt/clickhouse/data/increment/a/
|
||||||
cat /opt/clickhouse/data/increment/a/increment.txt
|
cat /opt/clickhouse/data/increment/a/increment.txt
|
||||||
|
@ -13,7 +13,7 @@ echo "('2014-01-01', 'key1', 1, 'val1')" | clickhouse-client --query="INSERT INT
|
|||||||
echo "('2014-01-01', 'key1', -1, 'val1'),('2014-01-01', 'key1', 1, 'val2')" | clickhouse-client --query="INSERT INTO collapsing_test.p1 VALUES" || exit 7
|
echo "('2014-01-01', 'key1', -1, 'val1'),('2014-01-01', 'key1', 1, 'val2')" | clickhouse-client --query="INSERT INTO collapsing_test.p1 VALUES" || exit 7
|
||||||
echo "('2014-01-01', 'key1', -1, 'val2')" | clickhouse-client --query="INSERT INTO collapsing_test.p2 VALUES" || exit 8
|
echo "('2014-01-01', 'key1', -1, 'val2')" | clickhouse-client --query="INSERT INTO collapsing_test.p2 VALUES" || exit 8
|
||||||
|
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex stop || exit 10
|
sudo /etc/init.d/clickhouse-server stop || exit 10
|
||||||
|
|
||||||
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p0/20140101_20140101_1_1_0,m0/} || exit 12
|
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p0/20140101_20140101_1_1_0,m0/} || exit 12
|
||||||
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p1/20140101_20140101_1_1_0,m0/20140101_20140101_2_2_0} || exit 13
|
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p1/20140101_20140101_1_1_0,m0/20140101_20140101_2_2_0} || exit 13
|
||||||
@ -21,19 +21,19 @@ sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p1/20140101_20140101
|
|||||||
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p2/20140101_20140101_1_1_0,m1/20140101_20140101_3_3_0} || exit 15
|
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p2/20140101_20140101_1_1_0,m1/20140101_20140101_3_3_0} || exit 15
|
||||||
rm /opt/clickhouse/data/collapsing_test/m{0,1}/increment.txt || exit 29
|
rm /opt/clickhouse/data/collapsing_test/m{0,1}/increment.txt || exit 29
|
||||||
|
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex start || exit 16
|
sudo /etc/init.d/clickhouse-server start || exit 16
|
||||||
|
|
||||||
sleep 10s
|
sleep 10s
|
||||||
echo "OPTIMIZE TABLE collapsing_test.m0" | clickhouse-client || exit 17
|
echo "OPTIMIZE TABLE collapsing_test.m0" | clickhouse-client || exit 17
|
||||||
echo "OPTIMIZE TABLE collapsing_test.m1" | clickhouse-client || exit 18
|
echo "OPTIMIZE TABLE collapsing_test.m1" | clickhouse-client || exit 18
|
||||||
|
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex stop || exit 19
|
sudo /etc/init.d/clickhouse-server stop || exit 19
|
||||||
|
|
||||||
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p0/20140101_20140101_1_1_0,m1/} || exit 20
|
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p0/20140101_20140101_1_1_0,m1/} || exit 20
|
||||||
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p2/20140101_20140101_1_1_0,m0/20140101_20140101_3_3_0} || exit 21
|
sudo -u metrika cp -r /opt/clickhouse/data/collapsing_test/{p2/20140101_20140101_1_1_0,m0/20140101_20140101_3_3_0} || exit 21
|
||||||
rm /opt/clickhouse/data/collapsing_test/m{0,1}/increment.txt || exit 29
|
rm /opt/clickhouse/data/collapsing_test/m{0,1}/increment.txt || exit 29
|
||||||
|
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex start || exit 22
|
sudo /etc/init.d/clickhouse-server start || exit 22
|
||||||
|
|
||||||
sleep 10s
|
sleep 10s
|
||||||
echo "OPTIMIZE TABLE collapsing_test.m0" | clickhouse-client || exit 23
|
echo "OPTIMIZE TABLE collapsing_test.m0" | clickhouse-client || exit 23
|
||||||
|
@ -29,7 +29,7 @@ echo 'Files (there should be few non-old_ pieces):'
|
|||||||
ls $path
|
ls $path
|
||||||
|
|
||||||
echo 'Stopping server'
|
echo 'Stopping server'
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex stop || exit 7
|
sudo /etc/init.d/clickhouse-server stop || exit 7
|
||||||
|
|
||||||
echo 'Truncating in half each non-old_ piece with level>1'
|
echo 'Truncating in half each non-old_ piece with level>1'
|
||||||
pieces=`ls $path | grep -Pv '(^tmp_|^old_|_0$)' | grep -v 'increment.txt'` || exit 8
|
pieces=`ls $path | grep -Pv '(^tmp_|^old_|_0$)' | grep -v 'increment.txt'` || exit 8
|
||||||
@ -42,7 +42,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo 'Starting server'
|
echo 'Starting server'
|
||||||
sudo /etc/init.d/clickhouse-server-metrika-yandex start || exit 11
|
sudo /etc/init.d/clickhouse-server start || exit 11
|
||||||
|
|
||||||
until echo 'SHOW DATABASES' | clickhouse-client > /dev/null
|
until echo 'SHOW DATABASES' | clickhouse-client > /dev/null
|
||||||
do
|
do
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/usr/bin/config-processor
|
|
40
debian/rules
vendored
40
debian/rules
vendored
@ -66,7 +66,7 @@ clean:
|
|||||||
find ./debian/ -name "*.docs" -type l -delete
|
find ./debian/ -name "*.docs" -type l -delete
|
||||||
rm -f ./debian/copyright
|
rm -f ./debian/copyright
|
||||||
# Удалим созданные *.install файлы
|
# Удалим созданные *.install файлы
|
||||||
for DAEMON_PKG in ${DAEMONS}; do AUTO=`grep "# automatically created" debian/$$DAEMON_PKG-metrika-yandex.install`; if [ "x$$AUTO" != "x" ]; then rm -f debian/$$DAEMON_PKG-metrika-yandex.install; fi; done
|
for DAEMON_PKG in ${DAEMONS}; do AUTO=`grep "# automatically created" debian/$$DAEMON_PKG.install`; if [ "x$$AUTO" != "x" ]; then rm -f debian/$$DAEMON_PKG.install; fi; done
|
||||||
dh_clean
|
dh_clean
|
||||||
|
|
||||||
install: build
|
install: build
|
||||||
@ -82,7 +82,7 @@ install: build
|
|||||||
if [ -e debian/tmp/etc/init.d/clickhouse-server ]; then ln -s tmp/etc/init.d/clickhouse-server debian/clickhouse-server-base.clickhouse-server.init; fi
|
if [ -e debian/tmp/etc/init.d/clickhouse-server ]; then ln -s tmp/etc/init.d/clickhouse-server debian/clickhouse-server-base.clickhouse-server.init; fi
|
||||||
|
|
||||||
# создаем дефолтный cron, если нет крон-файла созданного пользователем
|
# создаем дефолтный cron, если нет крон-файла созданного пользователем
|
||||||
# cron_name имеет вид daemonname-metrika-yandex
|
# cron_name имеет вид daemonname
|
||||||
# Для ClickHouse не должно быть лишних зависимостей.
|
# Для ClickHouse не должно быть лишних зависимостей.
|
||||||
for I in debian/tmp/etc/init.d/*; \
|
for I in debian/tmp/etc/init.d/*; \
|
||||||
do \
|
do \
|
||||||
@ -94,38 +94,36 @@ install: build
|
|||||||
echo "#*/10 * * * * root /etc/init.d/$$cron_name condstart 1>/dev/null 2>&1" > debian/tmp/etc/cron.d/$$cron_name; \
|
echo "#*/10 * * * * root /etc/init.d/$$cron_name condstart 1>/dev/null 2>&1" > debian/tmp/etc/cron.d/$$cron_name; \
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
# Создаём нужные *.install файлы
|
# Making necessary *.install files
|
||||||
# Только для демонов, т.к. пакеты ClickHouse не имеют суффикса metrika-yandex
|
|
||||||
for DAEMON_PKG in ${DAEMONS}; do \
|
for DAEMON_PKG in ${DAEMONS}; do \
|
||||||
if [ ! -e "debian/$$DAEMON_PKG-metrika-yandex.install" ]; then \
|
if [ ! -e "debian/$$DAEMON_PKG.install" ]; then \
|
||||||
echo "# automatically created" > debian/$$DAEMON_PKG-metrika-yandex.install; \
|
echo "# automatically created" > debian/$$DAEMON_PKG.install; \
|
||||||
echo "/etc/$$DAEMON_PKG/config.xml" >> debian/$$DAEMON_PKG-metrika-yandex.install; \
|
echo "/etc/$$DAEMON_PKG/config.xml" >> debian/$$DAEMON_PKG.install; \
|
||||||
echo "/usr/bin/$$DAEMON_PKG" >> debian/$$DAEMON_PKG-metrika-yandex.install; \
|
echo "/usr/bin/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.install; \
|
||||||
echo "/etc/cron.d/$$DAEMON_PKG-metrika-yandex" >> debian/$$DAEMON_PKG-metrika-yandex.install; \
|
echo "/etc/cron.d/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.install; \
|
||||||
if [ -e "debian/tmp/etc/monrun/conf.d/$$DAEMON_PKG.conf" ]; then \
|
if [ -e "debian/tmp/etc/monrun/conf.d/$$DAEMON_PKG.conf" ]; then \
|
||||||
echo "/etc/monrun/conf.d/$$DAEMON_PKG.conf" >> debian/$$DAEMON_PKG-metrika-yandex.install; \
|
echo "/etc/monrun/conf.d/$$DAEMON_PKG.conf" >> debian/$$DAEMON_PKG.install; \
|
||||||
fi;\
|
fi;\
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# Создаём нужные *.postinst файлы
|
# Making necessary *.postinst files
|
||||||
# Note: Только для демонов, т.к. пакеты ClickHouse не имеют суффикса metrika-yandex
|
|
||||||
for DAEMON_PKG in ${DAEMONS}; do \
|
for DAEMON_PKG in ${DAEMONS}; do \
|
||||||
if [ ! -e "debian/$$DAEMON_PKG-metrika-yandex.postinst" ]; then \
|
if [ ! -e "debian/$$DAEMON_PKG.postinst" ]; then \
|
||||||
echo "# automatically created" > debian/$$DAEMON_PKG-metrika-yandex.postinst; \
|
echo "# automatically created" > debian/$$DAEMON_PKG.postinst; \
|
||||||
echo "mkdir -p /etc/$$DAEMON_PKG/conf.d" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \
|
echo "mkdir -p /etc/$$DAEMON_PKG/conf.d" >> debian/$$DAEMON_PKG.postinst; \
|
||||||
echo "chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \
|
echo "chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.postinst; \
|
||||||
if [ -e "debian/tmp/etc/init.d/$$DAEMON_PKG-metrika-yandex" ]; then \
|
if [ -e "debian/tmp/etc/init.d/$$DAEMON_PKG" ]; then \
|
||||||
if echo $$DAEMON_PKG | grep server > /dev/null; then\
|
if echo $$DAEMON_PKG | grep server > /dev/null; then\
|
||||||
echo "update-rc.d $$DAEMON_PKG-metrika-yandex defaults > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \
|
echo "update-rc.d $$DAEMON_PKG defaults > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG.postinst; \
|
||||||
else\
|
else\
|
||||||
echo "update-rc.d $$DAEMON_PKG-metrika-yandex start 30 2 3 4 5 . stop 70 0 1 6 . > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \
|
echo "update-rc.d $$DAEMON_PKG start 30 2 3 4 5 . stop 70 0 1 6 . > /dev/null || exit \$$?" >> debian/$$DAEMON_PKG.postinst; \
|
||||||
fi\
|
fi\
|
||||||
fi\
|
fi\
|
||||||
\
|
\
|
||||||
else \
|
else \
|
||||||
echo >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \
|
echo >> debian/$$DAEMON_PKG.postinst; \
|
||||||
echo "mkdir -p /etc/$$DAEMON_PKG/conf.d; chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG-metrika-yandex.postinst; \
|
echo "mkdir -p /etc/$$DAEMON_PKG/conf.d; chown -R metrika: /etc/$$DAEMON_PKG" >> debian/$$DAEMON_PKG.postinst; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ function add_daemon_impl {
|
|||||||
local daemon=$1
|
local daemon=$1
|
||||||
local control=$CONTROL
|
local control=$CONTROL
|
||||||
local dependencies=$2
|
local dependencies=$2
|
||||||
local description_short="${daemon%-metrika-yandex/ daemon}"
|
local description_short="${daemon%/ daemon}"
|
||||||
local description_full=$3
|
local description_full=$3
|
||||||
|
|
||||||
echo -e "\n\n" >> $control;
|
echo -e "\n\n" >> $control;
|
||||||
@ -48,7 +48,7 @@ function make_control {
|
|||||||
#skip it explicitly
|
#skip it explicitly
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
add_daemon_impl "${DAEMON_PKG}-metrika-yandex"
|
add_daemon_impl "${DAEMON_PKG}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user