我正在使用Cloudera Distribution的HUE编辑器运行HIVE查询 即使我看到JAR文件,它也无法找到JAR文件 我做了两件事:
"Error while processing statement: /opt/cloudera/parcels/CDH/jars/hive-hcatalog-core-1.1.0-cdh5-4-7.jar does not exist"
根据以下命令,该目录中存在jar文件:
[jars]$ pwd
/opt/cloudera/parcels/CDH/jars
[jars]$ ls -ltr hive-hcatalog*
-rw-r--r-- 1 root root 54875 Sep 17 2015 hive-hcatalog-streaming-1.1.0-cdh5.4.7.jar
-rw-r--r-- 1 root root 51534 Sep 17 2015 hive-hcatalog-server-extensions-1.1.0-cdh5.4.7.jar
-rw-r--r-- 1 root root 51359 Sep 17 2015 hive-hcatalog-pig-adapter-1.1.0-cdh5.4.7.jar
-rw-r--r-- 1 root root 253955 Sep 17 2015 hive-hcatalog-core-1.1.0-cdh5.4.7.jar
第二种选择: 1.我下载了另一个JsonSerDe并将其加载到我的主目录
json-serde-1.3-jar-with-dependencies.jar
2。更改了ADD命令 3.仍然是同样的错误
使用以下方法运行: 1. Cloudera Distribution 5.4.7 2. HUE EDITOR
以下是创建HIVE表的脚本:
ADD JAR /opt/cloudera/parcels/CDH/jars/hive-hcatalog-core-1.1.0-cdh5-4-7.jar;
DROP TABLE IF EXISTS aacoe.BROKERAGE_EVENTS;
CREATE EXTERNAL TABLE IF NOT EXISTS aacoe.BROKERAGE_EVENTS (
evt struct<evtTypCd string ,
evtCd string ,
evtDscTe string ,
evtLclTs string ,
evtLclTmZnNa string ,
evtUtcTcfTs string ,
evtUtcTcfQy string ,
smtNr string ,
busLinDscTe string ,
smtDcvDt string ,
dclUidNr string ,
mltPrfOfDelNa string ,
mltDelOdrNr string ,
mltSmtConNr string ,
xcpRsnCd string ,
xcpRsnDscTe string ,
xcpRlvCd string ,
xcpRlvDscTe string ,
xcpRlvLclTs string ,
xcpRlvLclTmZnNa string ,
xcpRlvUtcTcfTs string ,
xcpRlvUtcTcfQy string ,
xcpCtmDspCd string ,
rpnInfSrcCrtUtcTcfTs string ,
rpnInfSrcCrtUtcTcfQy string ,
rpnInfSrcCrtLclTs string ,
rpnInfSrcCrtLclTmZnNa string ,
rpnEntLinNr string ,
rpnGovAcoTe string ,
rpnEntLvlSts string ,
rpnLinLvlSts string ,
loc array<struct<
adLin1Te string ,
adLin2Te string ,
adLin3Te string ,
adMunNa string ,
adPslCd string ,
adCnySdvCd string ,
adXcpDclPorCd string ,
ogzNr string ,
adCnyCd : string ,
>>>
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
load data local inpath '/data/5/xxxxxx/subject/testdata/BAS/EVENTS/' into table aacoe.BROKERAGE_EVENTS;