Member since
03-14-2016
4721
Posts
1111
Kudos Received
874
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2731 | 04-27-2020 03:48 AM | |
| 5290 | 04-26-2020 06:18 PM | |
| 4459 | 04-26-2020 06:05 PM | |
| 3584 | 04-13-2020 08:53 PM | |
| 5387 | 03-31-2020 02:10 AM |
02-20-2018
10:44 AM
1 Kudo
@yassine sihi To stop whole "Hive Service" # curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE . To start whole "Hive Service" # curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"STARTED"}}}' http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE .
... View more
02-20-2018
10:41 AM
1 Kudo
@yassine sihi Similarly you can use the following API calls to stop the HIveServer2 & Metastore: To stop HiveServer2 on host "amb25103.example.com" # curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop HiveServer2","operation_level":{"level":"HOST_COMPONENT","cluster_name":"plain_ambari","host_name":"amb25103.example.com","service_name":"HIVE"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25103.example.com/host_components/HIVE_SERVER? To stop HiveMetastore on host "amb25103.example.com" # curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Hive Metastore","operation_level":{"level":"HOST_COMPONENT","cluster_name":"plain_ambari","host_name":"amb25103.example.com","service_name":"HIVE"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25103.example.com/host_components/HIVE_METASTORE? .
... View more
02-20-2018
10:37 AM
1 Kudo
@yassine sihi If you have Ambari managed cluster then you can find that information just by a simple API call: 1. To findout Hive metastore host: # curl -u admin:admin -H "X-Requested-By: ambari" -X GET http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE/components/HIVE_METASTORE | grep 'host_name' | awk '{print $NF}'
2. To findout Hive Server2 host. # curl -u admin:admin -H "X-Requested-By: ambari" -X GET http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE/components/HIVE_SERVER | grep 'host_name' | awk '{print $NF}'
. You will need to replace "amb25101.example.com" with Ambari Server Hostname. Also the "plain_ambari" with your Ambari cluster name.
... View more
02-20-2018
09:59 AM
@Gopal Mehakare Use ExcecuteProcess Processor to execute shell script Please see: https://community.hortonworks.com/articles/110097/use-excecuteprocess-processor-to-execute-shell-scr.html
... View more
02-20-2018
07:19 AM
@Anurag Mishra Some of the metrics list you can find here that are exposed to the AMS collector: For All kind of metrics: https://github.com/apache/ambari/tree/release-2.6.1/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/service-metrics . For particularly host specific metrics names you can refer to: https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/files/service-metrics/HOST.txt
... View more
02-20-2018
07:16 AM
@Anurag Mishra You can use Grafana to get the Host Level metrics which are sent by Ambari Metrics Monitor to Ambari Metrics Collector, By creating a custom dashboard. (Still it will be in form of Graph and not a single file with whole data) Like: In following case i created a New Dashboard with "HOST" metrics and the metrics name is "byte_in" with Aggregator as "avg" .
... View more
02-20-2018
07:11 AM
1 Kudo
@Anurag Mishra However one thing you can try: You can make the following API call to query individual Host metrics for a specific time range. example: # curl -v "http://amb25102.example.com:6188/ws/v1/timeline/metrics?metricNames=bytes_in._rate._avg&hostname=&appId=HOST&instanceId=&startTime=1451630974&endTime=1519110315" . However in this case you will need to keep changing the metrics name like "byte_in" .... The time range you can take longer like "1451630974" means starting from 1 Jan 2016 , till "1519110315" means now. NOTE: However as mentioned earlier there is no Single API call that can be used to fetch all the AMS collector data.
... View more
02-20-2018
07:02 AM
@Anurag Mishra There is not Rest API call which can be used to capture the whole Metrics Monitors/Collectors Data in form of a file. However you can query these data from the AMS collector Hbase database using utilities like sqlline as desceribed in As mentioned on the other thread:
https://community.hortonworks.com/questions/172151/data-source-for-ambari-metrics-collector.html?childToView=173755#comment-173755
... View more
02-20-2018
05:19 AM
@Irshad Muhammed It looks like the following API call is failing with "Connection reset by peer" # curl -sS -L -w '%{http_code}' -X PUT --data-binary @/usr/hdp/current/zeppelin-server/interpreter/spark/dep/zeppelin-spark-dependencies-0.6.0.2.5.3.0-37.jar -H 'Content-Type: application/octet-stream' 'http://ip-172-31-31-102.ec2.internal:50070/webhdfs/v1/apps/zeppelin/zeppelin-spark-dependencies-0.6.0.2.5.3.0-37.jar?op=CREATE&user.name=hdfs&overwrite=True&permission=444 . This generally happens when the communication is broken (or timed out by some firewall rule) while uploading the JAR to HDFS using webhdfs API "http://ip-172-31-31-102.ec2.internal:50070/webhdfs/v1/apps/zeppelin/zeppelin-spark-dependencies-0.6.0.2.5.3.0-37.jar". Test-1) So can you please check how much time does this API call takes from your few cluster nodes? And also to see if you are able to put this JAR to HDFS using the same API call from any of your cluster node? Test-2). While you are trying to upload this JAR, Please check your NameNode log to see if there is any error/warning? .
... View more
02-19-2018
08:57 PM
@Irshad Muhammed After the change all the services startup are failing. So can you please share some of the service log so that we can see what they are complaining about. Logs must give us some useful hint when services fails.
... View more