ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhuvnesh Chaudhary <bchaudh...@pivotal.io>
Subject Re: Checking installed services.
Date Wed, 09 Dec 2015 22:37:51 GMT
Hello Christopher,

You can check the key clusterHostInfo and examine its content if they have
any component for Knox (knox_gateway_hosts). In params.py you can probably
use the below.
config = Script.get_config()
config['clusterHostInfo']

Example of config['clusterHostInfo'] with knox during start of the
component.

{'snamenode_host': ['c6402.ambari.apache.org'], 'nm_hosts': ['
c6402.ambari.apache.org', 'c6403.ambari.apache.org', '
c6401.ambari.apache.org'], 'app_timeline_server_hosts': ['
c6402.ambari.apache.org'], 'hawqsegment_hosts': ['c6401.ambari.apache.org'],
'all_ping_ports': ['8670', '8670', '8670'], 'rm_host': ['
c6402.ambari.apache.org', 'c6401.ambari.apache.org'], 'all_hosts': ['
c6402.ambari.apache.org', 'c6403.ambari.apache.org', '
c6401.ambari.apache.org'], 'slave_hosts': ['c6402.ambari.apache.org', '
c6403.ambari.apache.org', 'c6401.ambari.apache.org'], 'all_racks':
['/default-rack', '/default-rack', '/default-rack'], 'all_ipv4_ips':
['192.168.64.102', '192.168.64.103', '192.168.64.101'], 'hs_host': ['
c6402.ambari.apache.org'], *'knox_gateway_hosts': ['c6401.ambari.apache.org
<http://c6401.ambari.apache.org>']*, 'hawqmaster_hosts': ['
c6403.ambari.apache.org'], 'namenode_host': ['c6401.ambari.apache.org'],
'pxf_hosts': ['c6402.ambari.apache.org', 'c6403.ambari.apache.org', '
c6401.ambari.apache.org'], 'ambari_server_host': ['c6401.ambari.apache.org'],
'zookeeper_hosts': ['c6402.ambari.apache.org', 'c6403.ambari.apache.org', '
c6401.ambari.apache.org'], 'hawqstandby_hosts': ['c6402.ambari.apache.org']}

Thanks,
Bhuvnesh Chaudhary
Email: bchau <bchaudhary@gopivotal.com>dhary@pivotal.io
Desk: +1-650-846-1696 | Mobile: +1-973-906-6976

On Wed, Dec 9, 2015 at 12:53 PM, Christopher Jackson <
jackson.christopher.lee@gmail.com> wrote:

> Hi All,
>
> Does the core ambari.resource.management python scripts provide any
> mechanism for checking if a given service is installed? For instance how
> would I go about setting a flag whether or not Knox is installed in the
> params.py file for a custom service?
>
> Regards,
> Christopher Jackson

Mime
View raw message