Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Is there any possibility to decommission the node through REST API?

Solved Go to solution
Highlighted

Is there any possibility to decommission the node through REST API?

Expert Contributor

I am looking to decommission the node through REST API.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is there any possibility to decommission the node through REST API?

Mentor
4 REPLIES 4

Re: Is there any possibility to decommission the node through REST API?

Mentor

Re: Is there any possibility to decommission the node through REST API?

Expert Contributor

Thank you @Artem Ervits.

Re: Is there any possibility to decommission the node through REST API?

Expert Contributor

curl -u admin:$PASSWORD -i -H 'X-Requested-By: ambari'-X PUT -d

'{"RequestInfo": {"context" :"Start HDFS via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}'

http://`hostname -f`:8080/api/v1/clusters/$CLUSTER_NAME/services/HDFS

In the above curl command, what is the meaning for "hostname -f". I am new to usage of REST APIs, it may be a stupid question. I would like to get clear idea for the above command.

Re: Is there any possibility to decommission the node through REST API?

Mentor

@Ram D ah ok, yes in this example you will get FQDN of the server name for URL. I didn't know you can do that in curl command but basically if you run hostname -f as Linux command, you will get FQDN of your host. In context of the curl command, it will populate the URL programmatically with FQDN instead of using the node name explicitly.

Don't have an account?
Coming from Hortonworks? Activate your account here