这是我收到的错误
13288 [main] ERROR hive.ql.metadata.Hive - MetaException(message:java.lang.IllegalArgumentException: Pathname /apps/hive/warehouse/my_db.db/clog/${clogDataOutputDir}/logmessages.log.${hiveconf:current_date} from hdfs://hdphio/apps/hive/warehouse/my_db.db/commlog/${commlogDataOutputDir}/logmessages.log.${hiveconf:current_date} is not a valid DFS filename.)
我的hive脚本如下所示:
alter table my_db.clog add partition (create_dt = '${hiveconf:formatted_date}') location '${clogDataOutputDir}/logmessages.log.${hiveconf:current_date}';
我的oozie工作流程
<workflow-app xmlns="uri:oozie:workflow:0.4" name="hive-add-partition-clog">
<start to="add_hive_cl_partition"/>
<action name="add_hive_cl_partition">
<hive xmlns="uri:oozie:hive-action:0.2">
<job-tracker>${resourceManager}</job-tracker>
<name-node>${nameNode}</name-node>
<job-xml>hive-site-conf.xml</job-xml>
<script>AddPartition.sql</script>
<param>formatted_date=${formatted_date}</param>
<param>current_date=${current_date}</param>
<file>${nameNode}/user/me/warehouse/etl/clog/clog_hive_daily/lib/hive-site-conf.xml</file>
</hive>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
参数formatted_date和current_date来自协调器应用程序。查看应用程序日志,两个参数都会解析为预期的内容。
Parameters:
------------------------
formatted_date=2016-02-04
current_date=20160204
------------------------
Hive command arguments :
--hiveconf
hive.log4j.file=/grid/4/yarn/local/usercache/tchoedak/appcache/application_1454353377151_0855/container_e19_1454353377151_0855_01_000002/hive-log4j.properties
--hiveconf
hive.log4j.exec.file=/grid/4/yarn/local/usercache/tchoedak/appcache/application_1454353377151_0855/container_e19_1454353377151_0855_01_000002/hive-exec-log4j.properties
--hivevar
formatted_date=2016-02-04
--hivevar
current_date=20160204
-f
AddPartition.sql
我的问题是,为什么Hive试图将我传递的params视为路径名?我需要在我的WF中更改配置以解决此问题吗?