Member since
08-08-2017
1652
Posts
30
Kudos Received
11
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1998 | 06-15-2020 05:23 AM | |
| 16457 | 01-30-2020 08:04 PM | |
| 2146 | 07-07-2019 09:06 PM | |
| 8342 | 01-27-2018 10:17 PM | |
| 4730 | 12-31-2017 10:12 PM |
04-27-2020
03:04 AM
hi all the following ambari API will stop only the data-nodes on workers machines # curl -s -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop DataNodes","operation_level":{"level":"SERVICE","cluster_name":"$CLUSTER_NAME"},"query":"HostRoles/component_name=DATANODE&HostRoles/host_name.in(dn1.example.com,dn2.example.com,dn3.example.com)&HostRoles/maintenance_state=OFF"},"Body":{"HostRoles":{"state":"INSTALLED"}}}' "h ttp://$AMBARI_FQDN:8080/api/v1/clusters/$CLUSTER_NAME/host_components" now we want to replace the list - n1.example.com,dn2.example.com,dn3.example.com with variable - DATANODES=n1.example.com,dn2.example.com,dn3.example.com so $DATANODES will replce the list in the API as the following # curl -s -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop DataNodes","operation_level":{"level":"SERVICE","cluster_name":"$CLUSTER_NAME"},"query":"HostRoles/component_name=DATANODE&HostRoles/host_name.in($DATANODES)&HostRoles/maintenance_state=OFF"},"Body":{"HostRoles":{"state":"INSTALLED"}}}' "h ttp://$AMBARI_FQDN:8080/api/v1/clusters/$CLUSTER_NAME/host_components" but this isn't working , any advice how to set it correctly ?
... View more
Labels:
- Labels:
-
Ambari Blueprints
04-26-2020
08:42 PM
Dear Jay - what you think about my previous answer ?
... View more
04-26-2020
10:14 AM
example: [root@master2 ~]# su yarn [yarn@master2 root]$ yarn rmadmin -getServiceState rm1 standby [yarn@master2 root]$ yarn rmadmin -getServiceState rm2 active
... View more
04-26-2020
07:35 AM
hi all
we have two master machines
master01
master02
on both machines yarn resource manager is running as active/standby )
how to verify which machine is with active resource manager by ambari rest api ?
... View more
Labels:
04-26-2020
03:20 AM
hi all in ambari we have the following hive components how to stop Hive Metastore and HiveServer2 by cli ?
... View more
Labels:
- Labels:
-
Apache Hive
04-24-2020
07:08 AM
please give some screenshot from ambari as you know each service have a log file , try to see what are the details from the log
... View more
04-01-2020
02:10 AM
Dear Jay , can you help me with my post - https://community.cloudera.com/t5/Support-Questions/how-to-use-Ambari-API-to-add-host-to-new-config-group/td-p/293016
... View more
03-31-2020
12:51 AM
hi all
what could be the reason that sometimes we get - REASON: Server not yet listening on http port 8080 when we start the ambari server and sometimes its start successfully ?
ambari-server start Using python /usr/bin/python Starting ambari-server Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari database consistency check started... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start............................................................ DB configs consistency check: no errors and warnings were found. ERROR: Exiting with exit code 1. REASON: Server not yet listening on http port 8080 after 50 seconds. Exiting.
# ambari-server start Using python /usr/bin/python Starting ambari-server Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Ambari database consistency check started... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start....................................... Server started listening on 8080
DB configs consistency check: no errors and warnings were found. Ambari Server 'start' completed successfully.
... View more
Labels:
- Labels:
-
Apache Ambari
02-27-2020
04:25 PM
1 Kudo
Dear Jay when we run the API we get the following master02 - is the machine with ambari server kafka01 - is the first kafka machine where we are wrong ? curl -iskH "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Stop Kafka Broker","operation_level":{"level":"HOST_COMPONENT","cluster_name":"NwCluster","host_name":"kafka01","service_name":"KAFKA"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://master02:8080/api/v1/clusters/HDP_SYS76/hosts/kafka01/host_components/KAFKA_BROKER HTTP/1.1 404 Not Found X-Frame-Options: DENY X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Cache-Control: no-store Pragma: no-cache Set-Cookie: AMBARISESSIONID=15lniq8gcyggwudtsp5sd70fp;Path=/;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT User: admin Content-Type: text/plain Content-Length: 243 { "status" : 404, "message" : "org.apache.ambari.server.controller.spi.NoSuchParentResourceException: Parent Host resource doesn't exist. Host not found, cluster=HDP_SYS76, hostname=kafka01. Host not found, cluster=HDP_SYS76, hostname=kafka01"
... View more
02-27-2020
04:11 PM
Dear Jay +1 for your excellent answer I will test this API soon when I will come to office , I will update soon
... View more