Protocol message was toolarge. May be malicious. Use CodedInputStream.setSizeLimit() to increase ...

来源:互联网 发布:2017做淘宝客要交钱吗 编辑:程序博客网 时间:2024/06/05 18:47

这是HBase较老版本的一个Bug,主要出现在HBase 0.98.2以及使用HBase 0.98.2的分布式数据库如Titan,JanusGraph中

Caused by:Portable(java.io.IOException): Call to host:port failed on local exception:com.google.protobuf.InvalidProtocolBufferException: Protocol message was toolarge. May be malicious. Use CodedInputStream.setSizeLimit() to increase thesize limit.

原因:Google Protobuf默认Block上限是64MB,当访问超过64MB的HBase Cell时出现上述异常。

超级节点的Get操作,其对应的HBase Cell一般超过64MB,get该节点时导致Protobuf访问异常。Scan和Write不受上述限制影响。

解决:升级HBase Client版本

      1)修改HBase Client端ProtobufUtil.java代码,将size设置到合适值,然后重新编译HBase。

      2)  采用更新版本的HBase,如HBase 0.98.23-hadoop*已经修正了这个bug。

Reference

https://issues.apache.org/jira/browse/HBASE-13825


0 0