CDH 5.3.2 - 需要从 shell/script 重新启动 impala 守护程序
CDH 5.3.2 - Need to restart impala daemon from shell/script
我正在使用 CDH 5.3.2 集群并且需要能够从脚本中 start/stop impala 守护进程。 Cloudera Docs中提到的命令
sudo service impala-server start
在我的 CDH 5.10 本地 VM 上工作正常,但在 CDH 5.3.2 集群上我收到错误 "impala-server: unrecognized service"。在检查 /etc/init.d 时,我发现也没有列出此类服务(虽然它在 5.10 版本中列出)
然后我尝试直接从impalabin目录
重启服务
cd /usr/bin
./impalad stop
但是 运行 现在出现以下错误:
E0918 11:55:27.815739 12046 JniFrontend.java:622] FileSystem is file:///
W0918 11:55:27.817589 12046 JniFrontend.java:534] Cannot detect CDH version. Skipping Hadoop configuration checks
E0918 11:55:27.817620 12046 impala-server.cc:210] Unsupported file system. Impala only supports DistributedFileSystem but the configured filesystem is: LocalFileSystem.fs.defaultFS(file:///) might be set incorrectly
E0918 11:55:27.817631 12046 impala-server.cc:212] Aborting Impala Server startup due to improper configuration
我在 Cloudera Manager 上检查了 core-site.xml 并且 fs.defaultFS 设置正确,所以不确定它从哪里选取值。关于如何在这方面取得进一步进展的任何指示?
从命令行启动 Impala 的 init.d 服务包旨在供 不想 使用 Cloudera Manager 的 CDH 用户使用.在 Cloudera Manager 集群上启动和停止 Impala 的正确方法是使用 CM API:
https://cloudera.github.io/cm_api/apidocs/v17/index.html
tutorial 展示了如何使用 CM API,但对于您的情况,您可能需要这样做:
$ curl -X POST -u USER:PASSWORD \
'CM_URL//api/v1/clusters/CLUSTERNAME/services/IMPALA_SERVICE/commands/stop'
用适当的值替换 USER、PASSWORD、CM_URL、CLUSERNAME、IMPALA_SERVICE_NAME。 curl 命令将 return 一个命令 ID。
然后用命令 ID 轮询此 API 以查看 start/stop 操作是否已完成。
$ curl -u USER:PASSWORD 'CM_URL//api/v1/commands/COMMAND_ID'
但是,如果您仍想使用 init.d 服务包,则需要安装 impala-server
包。
我正在使用 CDH 5.3.2 集群并且需要能够从脚本中 start/stop impala 守护进程。 Cloudera Docs中提到的命令
sudo service impala-server start
在我的 CDH 5.10 本地 VM 上工作正常,但在 CDH 5.3.2 集群上我收到错误 "impala-server: unrecognized service"。在检查 /etc/init.d 时,我发现也没有列出此类服务(虽然它在 5.10 版本中列出)
然后我尝试直接从impalabin目录
重启服务cd /usr/bin
./impalad stop
但是 运行 现在出现以下错误:
E0918 11:55:27.815739 12046 JniFrontend.java:622] FileSystem is file:///
W0918 11:55:27.817589 12046 JniFrontend.java:534] Cannot detect CDH version. Skipping Hadoop configuration checks
E0918 11:55:27.817620 12046 impala-server.cc:210] Unsupported file system. Impala only supports DistributedFileSystem but the configured filesystem is: LocalFileSystem.fs.defaultFS(file:///) might be set incorrectly
E0918 11:55:27.817631 12046 impala-server.cc:212] Aborting Impala Server startup due to improper configuration
我在 Cloudera Manager 上检查了 core-site.xml 并且 fs.defaultFS 设置正确,所以不确定它从哪里选取值。关于如何在这方面取得进一步进展的任何指示?
从命令行启动 Impala 的 init.d 服务包旨在供 不想 使用 Cloudera Manager 的 CDH 用户使用.在 Cloudera Manager 集群上启动和停止 Impala 的正确方法是使用 CM API:
https://cloudera.github.io/cm_api/apidocs/v17/index.html
tutorial 展示了如何使用 CM API,但对于您的情况,您可能需要这样做:
$ curl -X POST -u USER:PASSWORD \
'CM_URL//api/v1/clusters/CLUSTERNAME/services/IMPALA_SERVICE/commands/stop'
用适当的值替换 USER、PASSWORD、CM_URL、CLUSERNAME、IMPALA_SERVICE_NAME。 curl 命令将 return 一个命令 ID。
然后用命令 ID 轮询此 API 以查看 start/stop 操作是否已完成。
$ curl -u USER:PASSWORD 'CM_URL//api/v1/commands/COMMAND_ID'
但是,如果您仍想使用 init.d 服务包,则需要安装 impala-server
包。