【发布时间】:2019-03-22 14:08:28
【问题描述】:
我正在使用 Ambari 2.6.2.2 并安装了 Hbase,为此我启动了 thrift 服务器。
如何将 thrift 服务器配置为在启动时启动?
现在,我只将 hbase 配置为使用 ambari 中的“服务自动启动”在启动时启动。
另外,如何配置 thrift 服务器在 oom 发生时重启?
谢谢
【问题讨论】:
我正在使用 Ambari 2.6.2.2 并安装了 Hbase,为此我启动了 thrift 服务器。
如何将 thrift 服务器配置为在启动时启动?
现在,我只将 hbase 配置为使用 ambari 中的“服务自动启动”在启动时启动。
另外,如何配置 thrift 服务器在 oom 发生时重启?
谢谢
【问题讨论】:
似乎没有办法直接从 Ambari 执行此操作。
我设法在启动时启动并使用 Supervisor 自动重启。 这是 Thrift 和 Rest 服务器的主管配置文件。
[program:hbase-thrift]
command=hbase thrift start -p 9090 --infoport 9095
stderr_logfile = /var/log/supervisor/thrift-stderr.log
stdout_logfile = /var/log/supervisor/thrift-stdout.log
autorestart=true
user=hbase
stdout_logfile_backups=5
stderr_logfile_backups=5
[program:hbase-rest]
command=hbase rest start -p 9080 --infoport 9085
stderr_logfile = /var/log/supervisor/rest-stderr.log
stdout_logfile = /var/log/supervisor/rest-stdout.log
autorestart=true
user=hbase
stdout_logfile_backups=5
stderr_logfile_backups=5
【讨论】: