RuntimeException MetaException(消息:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe

RuntimeException MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe

在 HDP 集群上,我正在尝试创建 Hive tables 并将其与现有的 Hbase tables 集成。它创建配置单元 table。但是当我尝试查询配置单元 table 时,它会抛出以下异常 ,尤其是当列数超过 200 时。

我检查了 hbase 和 hive 中的列数相同。没有得到正确的解决方案来调试它。

hive> select * from hbase_hive.lead;

FAILED: RuntimeException MetaException(message:org.apache.hadoop.hive.serde2.SerDeException 
org.apache.hadoop.hive.hbase.HBaseSerDe: 
columns has 273 elements while hbase.columns.mapping has 204 elements (counting the key if implicit))

这种情况下是否有列数限制?

请就此提出解决方案

This has fixed the issue.

https://hortonworks.my.salesforce.com/kA2E0000000LZQ5?srPos=0&srKp=ka2⟨=en_US

根本原因:

配置单元 Metastore 中 SERDE_PARAMS table 中 PARAM_VALUE 字段的字符限制为 4000 个字符是此问题的根本原因。此限制可防止 Hive 创建具有高列号的 table,最终导致 desc 或 select * from 失败并出现上述错误。

解决方法:可以通过在 hive metastore 中执行以下操作来解决此问题

-- log into Hive Metastore DB -- >alter table SERDE_PARAMS MODIFY PARAM_VALUE VARCHAR(400000000);