incubator-doris new OlapTableSink without any partition may cause IllegalStateException

knsnq2tg  于 2022-04-22  发布在  Java
关注(0)|答案(0)|浏览(89)

Describe the bug

In LoadingTaskPlanner#Plan(): OlapTableSink olapTableSink = new OlapTableSink(table, tupleDesc, partitionIds); If the table does not has any partition, Preconditions.checkState will throw IllegalStateException, but the funtion only cath UserException, that will cause load job status can not be updated。

To Reproduce

Steps to reproduce the behavior:

  1. create a table without partition:
    CREATE TABLE table1
    (
    event_day DATE,
    siteid INT DEFAULT '10',
    citycode SMALLINT,
    username VARCHAR(32) DEFAULT '',
    pv BIGINT SUM DEFAULT '0'
    )
    AGGREGATE KEY(event_day, siteid, citycode, username)
    PARTITION BY RANGE(event_day)()
    DISTRIBUTED BY HASH(siteid) BUCKETS 10
    PROPERTIES("replication_num" = "1");
  2. broker load job:
    LOAD LABEL db1.label1
    (
    DATA INFILE("hdfs://abc.com:8888/user/palo/test/ml/file1")
    INTO TABLE tbl1
    COLUMNS TERMINATED BY ","
    (event_date,siteid,citycode,username,pv)
    SET
    (
    date=event_date,
    id=siteid,
    code=citycode,
    name=username
    count=pv
    ),
    )
    WITH BROKER 'broker'
    (
    "username"="user",
    "password"="pass"
    )
    PROPERTIES
    (
    "timeout" = "3600"
    );
  3. error log:

  1. job status not be updated

Expected behavior

when IllegalStateException happed, job status should be updated to "CANCELLED"

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题