Member since
04-03-2019
962
Posts
1743
Kudos Received
146
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
11533 | 03-08-2019 06:33 PM | |
4912 | 02-15-2019 08:47 PM | |
4171 | 09-26-2018 06:02 PM | |
10599 | 09-07-2018 10:33 PM | |
5661 | 04-25-2018 01:55 AM |
05-03-2016
06:53 PM
3 Kudos
I would like to add multiple custom Kafka metrics via Ambari Metrics. What is the easiest way ? I have done this before using Ganglia and JMXTrans and now want to do it using ambari metrics. Please suggest.
... View more
Labels:
- Labels:
-
Apache Ambari
-
Apache Kafka
04-28-2016
02:59 PM
5 Kudos
@simran kaur
Too many questions 🙂 Now, there are .staging folder created in the hdfs directory which I believe is because service check could not be completed? --> YARN requires a staging directory for temporary files created by running jobs. My disk space is only 1GB I guess in the cluster. Do I need to increase it? (I guess I do). If yes, How do I increase it? What would be the ideal amount? --> Please have a look at below properties <property>
<name>dfs.datanode.data.dir</name>
<value>/hadoop/hdfs/data</value>
<final>true</final> This property has list of disks to be used for HDFS, you can add new disks to your linux machine and mention here by comma separated list. Have a look at https://community.hortonworks.com/questions/9772/how-to-add-more-disks-to-hdfs.html for more details Also, theoretically, there are always multiple data nodes in the cluster. Ambari shows only one. Do I need to create new ones myself? Yes. You can spin up one more VM and add it using ambari. Here is the guide to add new node using ambari - http://hortonworks.com/hadoop-tutorial/using-apache-ambari-add-new-nodes-existing-cluster/ What are the advantages and how do I create them? with multiple nodes, you will get more storage capacity and processing power. Also, what should be the ideal number of data nodes and why? You can run every component on single node, it really depends on your use case. Hope this information helps!
... View more
04-27-2016
07:30 PM
@Saurabh Kumar Can you please try to delete hdfs://HDPINFHA/user/root/.Trash/Current//lowes/sampleTest ?
... View more
04-27-2016
07:27 PM
@Saurabh Kumar - I just checked and 2.3.4 has HDFS-8983 implemented in it. I will try to re-produce and keep you posted.
... View more
04-27-2016
04:03 PM
1 Kudo
@Saurabh Kumar - Which version of HDP are you using? I see that protected directory feature is there in hadoop 2.8.0 https://issues.apache.org/jira/browse/HDFS-8983
... View more
04-25-2016
08:11 PM
@swagle Thank you. I will check with start all/stop all again.
... View more
04-25-2016
07:54 PM
3 Kudos
Okay till we get single command, I have created below script which can be useful for others who has same question 🙂 [root@sandbox test12334]# cat ambari.props
CLUSTER_NAME=Sandbox
AMBARI_ADMIN_USER=admin
AMBARI_ADMIN_PASSWORD=admin
AMBARI_HOST=sandbox.hortonworks.com [root@sandbox test12334]# cat restart_services.sh
#!/bin/bash
#Author - Kuldeep Kulkarni (http://crazyadmins.com)
#############
LOC=`pwd`
PROP=ambari.props
source $LOC/$PROP
#############
start_stale_services()
{
echo "curl -u $AMBARI_ADMIN_USER:$AMBARI_ADMIN_PASSWORD http://$AMBARI_HOST:8080/api/v1/clusters/Sandbox/host_components?HostRoles/stale_configs=true&fields=HostRoles/service_name,HostRoles/host_name&minimal_response=false"> /tmp/curl_ambari.sh
sh /tmp/curl_ambari.sh 1 > /tmp/stale_services_json 2>/dev/null
sleep 1
grep host_components /tmp/stale_services_json|grep -v stale|rev|cut -d'"' -f2|rev > /tmp/list_of_components
for URL in `cat /tmp/list_of_components`
do
curl -u $AMBARI_ADMIN_USER:$AMBARI_ADMIN_PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"HostRoles": {"state": "INSTALLED"}}' "$URL"
sleep 0.5
curl -u $AMBARI_ADMIN_USER:$AMBARI_ADMIN_PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"HostRoles": {"state": "STARTED"}}' "$URL"
done
}
start_stale_services Note - to run this script, you should have ambari.props and script at the same location. I tried below curl call to stop all/start all but it did not clear the stale service restart alerts hence I had to come up with above workaround. curl -u admin:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop HDFS via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services curl -u admin:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop HDFS via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services
... View more
04-25-2016
07:48 PM
Thanks @swagle
... View more
04-25-2016
05:35 PM
1 Kudo
Is there any single curl command to restart all the services with stale configurations using Ambari API ?
... View more
Labels:
- Labels:
-
Apache Ambari