一、缺少jar包:httpclient
报错:
"HiveServer2-Handler-Pool: Thread-696" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/protocol/ProtocolSocketFactory
需要加载commons-httpclient-3.1.jar
二、缺少jar包:eshadoop
报错:
FAILED: SemanticException Cannot find class 'org.elasticsearch.hadoop.hive.EsStorageHandler'
需要加载与正在使用的ES版本相同的版本号的:elasticsearch-hadoop-7.6.1.jar
三、在hive创建ES外表之后无法正常查询
报错:
Error: java.io.IOException: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Expected to find keystore file at [hdfs:///path/to/esh.keystore] but was unable to. Make sure that it is available on the classpath, or if not, that you have specified a valid file URI. (state=,code=0)
这里使用的是将keystore放在hdfs上的方式,
在建表语句中需要指定属性:'es.nodes.wan.only'='true',
具体解释