Hey Yusaku,
Thank you for your answer. With your help I was able to move it. I will just
add here some modifications to your instructions so it can help others.
4 - This command did not work for me but the following did:
curl -i -u USER:PASS -H 'X-Requested-By: ambari' -X POST
-d'{"HostRoles":{"component_name":"HISTORYSERVER"}}'
http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/TARGET_HOSTNAME/host_components
5 - I also needed to update some configs on the MapReduce2 service in Ambari.
The configs were the following: mapreduce.jobhistory.address and
mapreduce.jobhistory.webapp.address
Best Regards,
João Alves
> On 15 May 2015, at 01:22, Yusaku Sako <[email protected]> wrote:
>
> Hi,
>
> Unfortunately, History Server cannot be moved from the UI at the moment.
> However you can do the following:
>
> 1. Take a backup of your Ambari database
> 2. Stop History Server from the UI and wait until it is stopped.
> 3. Delete History Server from the source host via the API:
> curl -i -u admin:admin -H 'X-Requested-By: ambari' -X DELETE
> http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTERNAME/hosts/HOSTNAME/h
> ost_components/HISTORYSERVER
> 4. Add History Server to the target host via the API:
> curl -i -u admin:admin -H 'X-Requested-By: ambari' -X POST -d
> '{"host_components" : [{"HostRoles":{"component_name":"HISTORYSERVER"}}]
> }'
> http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/TARGET_HO
> STNAME
>
> 5. Go to the UI to install and start History Server.
>
> I hope this helps.
> Yusaku
>
>
> On 5/13/15 8:29 AM, "João Alves" <[email protected]> wrote:
>
>> Hey all,
>>
>> I have a cluster with HDP 2.1.7 stack which I recently upgraded from
>> Ambari 1.6.1 to 2.0.0. I have a computer in my cluster that I need to
>> decommission.
>>
>> I have been moving away all the master components from this machine. The
>> last remaining is the History Server however it seems that there is no
>> option to move it.
>>
>> I searched around and did not found any resources on how to do this.
>> Could someone give me any pointers on how to move this component to
>> another machine?
>>
>> Thanks for your help,
>> João Alves
>