hive版本:1.2.1000.2.6.5.0-292
hue版本:4.2.0
报错信息:
HiveSQLException: Invalid OperationHandle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier
解决方案参照:https://issues.apache.org/jira/browse/HIVE-15100
具体应该是sasl的默认buffer size为 65535 bytes
而hue在使用hive查询的过程中默认会使用'SET -v'参数,这样会导致hiveserver2侧的buffer size超过了默认的buffer size
修改hue/desktop/core/src/desktop/lib/thrift_util.py
def sasl_factory():
saslc = sasl.Client()
#增加下面这句话
saslc.setAttr("maxbufsize", 2**17 - 1)
saslc.setAttr("host", str(conf.host))
saslc.setAttr("service", str(conf.kerberos_principal))
if conf.mechanism == 'PLAIN':
saslc.setAttr("username", str(conf.username))
saslc.setAttr("password", str(conf.password)) # Defaults to 'hue' for a non-empty string unless using LDAP
else:
saslc.setAttr("maxbufsize", SASL_MAX_BUFFER.get())
saslc.init()
return saslc