使用配置单元配置hcatalog、webhcat

8dtrkrch  于 2021-06-02  发布在  Hadoop
关注(0)|答案(0)|浏览(270)

我正在安装hadoop,hive将与webhcat集成,webhcat将使用hadoop的map reduce作业来运行hive查询。
我安装了hadoop2.4.1和hive0.13.0(最新稳定版本)。
我使用web界面发送的请求是:

POST: http://localhost:50111/templeton/v1/hive?user.name='hadoop'&statusdir='out'&execute='show tables'

我得到的答复如下:

{
    "id": "job_local229830426_0001"
}

但是在日志webhcat-console-error.log中我发现这个作业的exit值是1,这意味着发生了一些错误。跟踪此错误时,我发现它缺少选项的参数:hiveconf
这是webhcat-site.xml,其中包含webhcat(以前称为templeton)的配置:

<configuration>
  <property>
      <name>templeton.port</name>
      <value>50111</value>
      <description>The HTTP port for the main server.</description>
  </property>
  <property>
    <name>templeton.hive.path</name>
    <value>/usr/local/hive/bin/hive</value>
    <description>The path to the Hive executable.</description>
 </property>
  <property>
    <name>templeton.hive.properties</name>
    <value>hive.metastore.local=false,hive.metastore.uris=thrift://localhost:9933,hive.metastore.sasl.enabled=false</value>
    <description>Properties to set when running hive.</description>
  </property>
</configuration>

但是执行的cmd查询很奇怪,因为它有一些没有值的额外hiveconf参数:

tool.TrivialExecService: Starting cmd: [/usr/local/hive/bin/hive, --service, cli, --hiveconf, --hiveconf, --hiveconf, hive.metastore.local=false, --hiveconf, hive.metastore.uris=thrift://localhost:9933, --hiveconf, hive.metastore.sasl.enabled=false, -e, show tables]

你知道吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题