Kudu 删除表range分区
https://kudu.apache.org/docs/command_line_tools_reference.html#table-drop_range_partition
注意事项
- 一次只能删一个分区
- 分区条件必须前后精准匹配
- 可以通过
kudu table describe
查看表信息(包括分区信息):
1 2
| kudu table describe 10.128.2.162:7051,10.128.2.72:7051,10.128.2.172:7051 bn_op_1228
|
方案一: kudu table 命令删除
切换到 kudu的bin目录
1 2 3 4 5 6 7 8 9 10 11 12 13
|
kudu table drop_range_partition <master_addresses> <table_name> <table_range_lower_bound> <table_range_upper_bound> [-lower_bound_type=<type>] [-upper_bound_type=<type>] [-negotiation_timeout_ms=<ms>] [-timeout_ms=<ms>]
kudu table drop_range_partition 10.128.2.162:7051,10.128.2.72:7051,10.128.2.172:7051 bn_op_1228 '[1609122103000000]' '[1669824000000000]' -timeout_ms=600000
kudu table describe 10.128.2.162:7051,10.128.2.72:7051,10.128.2.172:7051 bn_op_1228
kudu table drop_range_partition 10.128.2.162:7051,10.128.2.72:7051,10.128.2.172:7051 bn_op_1228 '[1658707200000000]' '[1658793600000000]' -timeout_ms=600000
|
方案二:通过trino/impala删除
trino
1 2 3
|
CALL kudu.system.drop_range_partition('default', 'bn_op_1228', '{"lower": "2022-07-26 00:00:00","upper": "2022-07-27 00:00:00"}');
|