clickhouse如何做冷,热数据分割存储?

准备目录和权限

sudo chmod -R 777 /etc/clickhouse-*

sudo mkdir /data1/clickhouse
sudo mkdir /data2/clickhouse
sudo mkdir /data3/clickhouse
sudo mkdir /data4/clickhouse

sudo chown -R clickhouse:clickhouse /data1/clickhouse
sudo chown -R clickhouse:clickhouse /data2/clickhouse
sudo chown -R clickhouse:clickhouse /data3/clickhouse
sudo chown -R clickhouse:clickhouse /data4/clickhouse

sudo chmod -R 777 /data1/clickhouse
sudo chmod -R 777 /data2/clickhouse
sudo chmod -R 777 /data3/clickhouse
sudo chmod -R 777 /data4/clickhouse

添加配置文件


cat > /etc/clickhouse-server/config.d/storage.xml <<-'EOF'
<?xml version="1.0"?>
<yandex>
	<storage_configuration>
		<disks>
			<data1>
				<!-- disk name -->
				<path>/data1/clickhouse/</path>
				<keep_free_space_bytes>102400</keep_free_space_bytes>
			</data1>
			<data2>
				<path>/data2/clickhouse/<
上一篇:进制转换_负数的补码


下一篇:SolrCore ‘collection1‘ is not available due to init failure: Cannot create d