-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add column zookeeper_name in system.replicas
- Loading branch information
Showing
6 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Create Tables | ||
Insert Data | ||
"t1","default",1 | ||
"t2","default",1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- Tags: zookeeper, replica | ||
|
||
SELECT 'Create Tables'; | ||
CREATE TABLE t1(k UInt32, v UInt32) ENGINE ReplicatedMergeTree('/clickhouse/tables/{database}/test_02723/zookeeper_name/t1', '1') ORDER BY k; | ||
|
||
CREATE TABLE t2(k UInt32, v UInt32) ENGINE ReplicatedMergeTree('/clickhouse/tables/{database}/test_02723/zookeeper_name/t2', '1') ORDER BY k; | ||
|
||
SELECT 'Insert Data'; | ||
|
||
INSERT INTO t1 SELECT * FROM generateRandom('k UInt32, v UInt32') LIMIT 1; | ||
INSERT INTO t2 SELECT * FROM generateRandom('k UInt32, v UInt32') LIMIT 1; | ||
|
||
SELECT | ||
table,zookeeper_name,count() | ||
FROM system.replicas | ||
INNER JOIN system.parts USING (database, table) | ||
WHERE database = currentDatabase() | ||
GROUP BY | ||
table,zookeeper_name | ||
FORMAT CSV; | ||
|
||
DROP TABLE t1; | ||
DROP TABLE t2; |