Member since
02-16-2016
19
Posts
56
Kudos Received
5
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2216 | 01-03-2018 09:52 PM | |
643 | 11-07-2017 12:45 AM | |
1159 | 11-07-2017 12:43 AM | |
742 | 09-22-2017 12:16 AM | |
937 | 03-24-2017 10:59 PM |
01-12-2018
08:15 PM
1 Kudo
@Michael Bronson There are a different possible reasons why the install failed. Will list out a couple of them here 1. Invalid configs in topology/ Invalid topology: In this scenario, your Ambari background operations will show Logical request in Pending status. Ambari-server.log will have the info about which configuration had invalid values 2. Service install/start failures: Details of failures will be available in Ambari background operations window. You can also use Ambari API to figure out what failed. And individual service logs usually have more details about the failure. E.g http://<AMBARI_HOST>:8080/api/v1/clusters/cl1/requests?to=end&page_size=100&fields=tasks/*&tasks/Tasks/status=FAILED Hope this helps!
... View more
01-03-2018
09:55 PM
2 Kudos
@Michael Bronson curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET http://localhost:8080/api/v1/clusters/cl1/components?fields=ServiceComponentInfo/state
... View more
01-03-2018
09:52 PM
4 Kudos
@Michael Bronson This API will get you status of all components on all hosts in your cluster curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET http://localhost:8080/api/v1/clusters/cl1/components?fields=host_components/HostRoles/state And if you need to find the status of individual component e.g for datanode; curl -u {ambari_username}:{ambari_password} -H "X-Requested-By:ambari" -i GET http://localhost:8080/api/v1/clusters/cl1/components/DATANODE?fields=host_components/HostRoles/state Hope this helps!
... View more
01-02-2018
09:48 PM
2 Kudos
@Michael Bronson You can get the service components status from the "ServiceComponentInfo/state" parameter. 1. To get all components state in single API: API : <AMBARI_HOST>/api/v1/clusters/cl1/components?fields=ServiceComponentInfo/state E.g In the response you can find something like this when MR History server is stopped: "ServiceComponentInfo": {"cluster_name": "cl1","component_name": "HISTORYSERVER","service_name": "MAPREDUCE2","state": "INSTALLED"} 2. To get more info for individual component, You can use this API resource <AMBARI_HOST>/api/v1/clusters/cl1/services/MAPREDUCE2/components/HISTORYSERVER Hopefully this helps!
... View more
11-07-2017
12:45 AM
1 Kudo
@vrathod, if you are looking for all supported OS for a stack for a given ambari release, you can try the getVersionDefinitions API with filters. E.g http://<AMBARI_HOST>:8080/api/v1/version_definitions?fields=VersionDefinition/stack_default,operating_systems/OperatingSystems/os_type,VersionDefinition/repository_version&VersionDefinition/show_available=true&VersionDefinition/stack_name=HDP Hope this helps!
... View more
11-07-2017
12:43 AM
6 Kudos
@vrathod, if you are looking for all supported stacks for a given ambari release, you can try the getVersionDefinitions API with filters. E.g http://<AMBARI_HOST>:8080/api/v1/version_definitions?fields=VersionDefinition/stack_default,operating_systems/OperatingSystems/os_type,VersionDefinition/repository_version&VersionDefinition/show_available=true&VersionDefinition/stack_name=HDP
... View more
10-27-2017
06:31 PM
1 Kudo
@Alluri Krishna Raju, Could you please post the failure logs from the ambari background operations window or log files for the start failures?
... View more
09-22-2017
12:16 AM
5 Kudos
@dbalasundaran You can try this APIs and programmatically find the diff between the configuration lists <AMBARI_HOST>/api/v1/clusters/cl1/configurations/service_config_versions?service_name=HDFS&group_name=<GROUP_NAME>&service_config_version.in(<VERSION_NUMBER>) E.g <AMBARI_HOST>/api/v1/clusters/cl1/configurations/service_config_versions?service_name=HDFS&group_name=mycg1&service_config_version.in(6)
<AMBARI_HOST>/api/v1/clusters/cl1/configurations/service_config_versions?service_name=HDFS&group_name=mycg1&service_config_version.in(7)
... View more
04-19-2017
09:07 PM
1 Kudo
@Naseem Could you please post the logs of the Ranger admin start process from the Ambari background operations window?
... View more
04-04-2017
05:25 PM
3 Kudos
@samarth srivastava Just in case if you're looking for the API to restart required services after some configuration chnages, You can use a GET call to find out the components to be restarted. http://${AMBARI_HOST}:8080/api/v1/clusters/${CLUSTER_NAME}/host_components?HostRoles/stale_configs=true And if a list of components to be restarted is returned, you can invoke a POST request with a request body as below: http://${AMBARI_HOST}:8080/api/v1/clusters/${CLUSTER_NAME}/requests Request body: {
"RequestInfo": {
"command": "RESTART",
"context": "Restart all required services",
"operation_level": "host_component"
},
"Requests/resource_filters": [{
"hosts_predicate": "HostRoles/stale_configs=true"
}]
}
Note: This API works with Ambari version 2.4+ only.
... View more