【问题标题】:Issues Creating Apache Kudu Range Partitioned Table创建 Apache Kudu 范围分区表的问题
【发布时间】:2022-11-08 13:02:46
【问题描述】:

我正在尝试使用哈希和范围分区创建一个简单的 Kudu 表。
当我尝试对 Range 分区使用 Decimal(18,0) 时,出现以下错误:非法状态异常:空

drop table if exists mydb.xxx;
create table if NOT EXISTS mydb.xxx (
            tx_id                      decimal(18,0)    not null ,
            tdl_id                     decimal(18,0)    not null ,
            dt1                        int ,                  
    PRIMARY KEY(tx_id,tdl_id) )
    PARTITION BY 
        HASH(tx_id,tdl_id) PARTITIONS 22 ,
        RANGE (tx_id )
    (
        partition values < 1000 ,
        partition 1000 <= values
    )
    stored as kudu;

该声明有效:

drop table if exists mydb.xxx;
create table if NOT EXISTS mydb.xxx (
            tx_id                      bigint         not null ,
            tdl_id                     decimal(18,0)  not null ,
            dt1                        int ,                  
    PRIMARY KEY(tx_id,tdl_id) )
    PARTITION BY 
        HASH(tx_id,tdl_id) PARTITIONS 22 ,
        RANGE (tx_id )
    (
        partition values < 1000 ,
        partition 1000 <= values
    )
    stored as kudu;

唯一的区别是 tx_id 的数据类型 有谁知道在 Kudu 中使用十进制数据类型进行范围分区是否非法? 谢谢您的帮助。

【问题讨论】:

    标签: partitioning illegalstateexception kudu


    【解决方案1】:

    请检查 kudu 平板服务器线程然后运行此更改

    如果存在 mydb.xxx,则删除表; 如果不存在 mydb.xxx 则创建表( tx_id bigint 不为空, tdl_id decimal(18,0) not null , dt1 整数,
    主键(tx_id,tdl_id)) 分区方式 HASH(tx_id,tdl_id) 分区 22 , 范围(tx_id) ( 分区值 < 1000 , 分区值 = 1000 , 分区值 >= 1000 ) 存储为 kudu;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-09
      • 1970-01-01
      • 1970-01-01
      • 2021-02-24
      相关资源
      最近更新 更多