Friday, December 30, 2016

Moving Spark History Server

  • Hadoop version: HDP
  • Commands
    curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://<ambari host>:8080/api/v1/clusters/<cluster name>/services/SPARK
    curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Component"},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://<ambari host>:8080/api/v1/clusters/<cluster name>/hosts/<old host>/host_components/SPARK_JOBHISTORYSERVER
    curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://<ambari host>:8080/api/v1/clusters/<cluster name>/services/SPARK/components/SPARK_JOBHISTORYSERVER
     
    curl -u admin:admin -H "X-Requested-By: ambari" -i -X POST http://<ambari host>:8080/api/v1/clusters/<cluster name>/services/SPARK/components/SPARK_JOBHISTORYSERVER
    curl -u admin:admin -H "X-Requested-By: ambari" -i -X POST -d '{"host_components":[{"HostRoles":{"component_name":"SPARK_JOBHISTORYSERVER"}}]}' http://<ambari host>:8080/api/v1/clusters/<cluster name>/hosts?Hosts/host_name=<new host>
    curl -u admin:admin -H "X-Requested-By: ambari" -i -X PUT -d '{"ServiceInfo": {"state" : "INSTALLED"}}' http://<ambari host>/api/v1/clusters/<cluster name>/services/SPARK

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.