2021-3-30

问题:impala JDBC创建Kudu内部表报错:CAUSED BY: IllegalArgumentException:table owner must not be null or empty

今天用JDBC创建kudu表的时候报错:

Impala - 图1

打印的SQL:

  1. CREATE TABLE external_table2
  2. (companyId BIGINT,
  3. workId BIGINT,
  4. name STRING,
  5. gender STRING,
  6. photo STRING,
  7. PRIMARY KEY(companyId))
  8. PARTITION BY HASH
  9. PARTITIONS 16 STORED AS KUDU;

这个SQL是没问题的,能到impala-shell当中完美执行。不过JDBC死活不行,疯狂报错:
java.sql.SQLException: [Cloudera][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:ImpalaRuntimeException: Error creating Kudu table 'impala::default.external_table2'

原因:权限问题,创建表不允许匿名创建,IllegalArgumentException:表所有者不能为null或空
CAUSED BY: IllegalArgumentException: table owner must not be null or empty
搞了半天解决,方法:在URL里面添加身份信息:

  1. "jdbc:impala://10.168.1.38:21050/default;UseSasl=0;AuthMech=0;UID=impala"

最终解决….

2021-6-3

问题:impala读取kudu写入TD,报错:[Cloudera]ImpalaJDBCDriver Error in fetching data rows: null;

image.png
原因:impala连接过多,在impala Web(IP:25000)中找到session,断开无用连接;同时调高impala连接数量。
![%F53W60CDWHXPW}0LA$28U.png