Member since
06-22-2017
8
Posts
0
Kudos Received
0
Solutions
05-13-2019
09:46 PM
Hi can you put datanode in maintenance through bash command or direct python command? I have ginormous and i want to quickly stop and start services. I am using hadoop-daemon.sh start to to start a datanode. I know maintenence mode is not from hadoop API that is built as part of Ambari.
... View more
11-29-2017
06:11 AM
Thanks Aditya That worked 🙂
... View more
11-29-2017
04:39 AM
Thanks Adtiya. Let me try the above one. I forgot to write in my post earlier not only I didn't receive the status but my command didn't switch the maintenance mode. Do you have any documentation which I can refer to?
... View more
11-28-2017
10:57 PM
How can i send the following command for putting datanode in maintenance mode in python program? curl -u user -H "X-Requested-By:ambari" -i -X PUT -d '{"RequestInfo":{"context":"Turn Off Maintenance Mode for host","query":"Hosts/host_name.in(host1)"},"Body":{"Hosts":{"maintenance_state":"OFF"}}}' http://ambari_host:8080/api/v1/clusters/clustername/hosts I am trying it in this way data = {"RequestInfo":{"context":"Turn OFF Maintenance Mode for host","query":"Hosts/host_name.in(host1,host2)"},"Body":{"Hosts":{"maintenance_state":"OFF"}}}
base_url = 'http://ambari_host:8080/api/v1/clusters/clustername/hosts'headers= {'Accept': 'application/json','data':data}
response = requests.put(base_url, data=json.dumps(data), auth=('username', argpaas), headers=headers) I don't get any response back. Thanks Meena Rajani
... View more
Labels:
- Labels:
-
Apache Hadoop
11-07-2017
06:15 PM
You can do a curl command to find out the Active and secondary Namenode for example curl -u username -H "X-Requested-By: ambari" -X GET http://cluster-hostname:8080/api/v1/clusters//services/HDFS
... View more