黑斑羚 | KUDU 按哈希显示分区我的行在哪里?

问题描述

我想在 KUDU 中使用 PARTITION BY HASH 测试 CREATE TABLE

这是我的 CREATE 子句。

CREATE TABLE customers (
  state STRING,name STRING,purchase_count int,PRIMARY KEY (state,name)
)
PARTITION BY HASH (state) PARTITIONS 2
STORED AS KUDU
TBLPROPERTIES (
  'kudu.master_addresses' = '127.0.0.1','kudu.num_tablet_replicas' = '1'
)

一些插入...

insert into customers values ('madrid','pili',8);
insert into customers values ('barcelona','silvia',8);
insert into customers values ('galicia','susi',8);

避免问题...

COmpuTE STATS customers;
Query: COmpuTE STATS customers
+-----------------------------------------+
| summary                                 |
+-----------------------------------------+
| Updated 1 partition(s) and 3 column(s). |
+-----------------------------------------+

然后……

show partitions customers;
Query: show partitions customers
+--------+-----------+----------+----------------+------------+
| # Rows | Start Key | Stop Key | leader Replica | # Replicas |
+--------+-----------+----------+----------------+------------+
| -1     |           | 00000001 | hidra:7050     | 1          |
| -1     | 00000001  |          | hidra:7050     | 1          |
+--------+-----------+----------+----------------+------------+
Fetched 2 row(s) in 2.31s

我的行在哪里? “-1”是什么意思?

有什么方法可以查看行分布是否正常工作?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)