3

我正在安装HadoopHive将与 WebHCat 集成,WebHCat将用于使用 Hadoop 的 Map-Reduce 作业通过它运行 hive 查询。

我安装了Hadoop 2.4.1Hive 0.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 中我发现这个作业的退出值为 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]

任何想法?

4

0 回答 0