启动hive命令时指定参数或自定义参数

启动hive命令时指定参数或自定义参数

在hive启动命令中指定一个参数

hive --hiveconf hive.job.submit.username=fuxin.zhao -e "select dt,count(1) from ods.s1_userinfo where dt>='2017-02-01' group by dt;"

在hive启动命令中指定多个参数,这些参数是hive-site.xml中参数,也开始自定义的惨。

hive --hiveconf hive.job.submit.username=fuxin.zhao --hiveconf hive.job.submit.group=develop -e "select dt,count(1) from ods.s1_userinfo where dt>='2017-02-01' group by dt;"

在resouceManager 的UI页面中查看job.xml文件中可以找到如下自定义的参数:

原文地址:https://www.cnblogs.com/honeybee/p/6434679.html