-
-
Save ze-gitan/7c941eef1906d37f0310 to your computer and use it in GitHub Desktop.
Ambari Custom Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>stack.log</name> | |
<value>/var/log/customService</value> | |
<description>Log directory</description> | |
</property> | |
<property> | |
<name>zk.home</name> | |
<value>localhost:2181</value> | |
<description>Zookeeper URL</description> | |
</property> | |
<property> | |
<name>custom.pid</name> | |
<value>/var/run/customService</value> | |
<description>Directory for PID file</description> | |
</property> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#status stanza only from original master.py | |
def status(self, env): | |
import params | |
env.set_params(params) | |
check=format("{params.pid_file}/Custom.pid") | |
check_process_status(check) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from resource_management import * | |
# server configurations | |
config = Script.get_config() | |
zk_home = config['configurations']['hl7-integration-config']['zk.home'] | |
log_level = config['configurations']['hl7-integration-config']['log.level'] | |
pid_file = config['configurations']['hl7-integration-config']['custom.pid'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change https://gist.github.com/ze-gitan/7c941eef1906d37f0310#file-master_status-py-L6
for
And if that is still not working then get the path with
glob.glob
.