我有这个配置hive-site.xml
<property>
<name>hive.aux.jars.path</name>
<value>/path/to/elasticsearch-hadoop-2.0.1.jar</value>
</property>
当我在 HiveCli 中将数据映射到 Elasticsearch 时,它可以通过以下代码正常工作:
CREATE EXTERNAL TABLE artists (...)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'radio/artists',
'es.index.auto.create' = 'false')
但是当我在 Hive Java 客户端(我启动了 Hiveserver2)中使用它时,它会抛出这个异常:
FAILED: Execution Error, return code 1
from org.apache.hadoop.hive.ql.exec.DDLTask.
org.apache.hadoop.hive.ql.metadata.HiveException:
Error in loading storage handler.org.elasticsearch.hadoop.hive.EsStorageHandler