Re: Use HAAdmin API

2017-10-24 Thread Mihir Monani
If you want to do failover of NameNode (or even kill NameNode process)
doing shell operation (like ./hdfs haadmin -getServiceState nn) is
mandatory from program.

For DataNode there is one function in DFSClient#datanodeReport which
provides list of LIVE Datanode.

To avoid shell operations of hdfs haadmin, i was looking for some function
which can provide Name of Active NameNode.

Is there anything implemented in Hadoop which provide Active NameNode?

On Fri, Oct 20, 2017 at 4:25 AM, Arpit Agarwal 
wrote:

> Mihir,
>
> HAAdmin is a private interface. Most of its functionality is exposed via
> the ‘hdfs haadmin’ command [1]. Will that work for you?
>
> 1. https://hadoop.apache.org/docs/r2.7.0/hadoop-project-
> dist/hadoop-hdfs/HDFSCommands.html#haadmin
>
>
>
>
> On 10/17/17, 4:28 AM, "Mihir Monani"  wrote:
>
> I wanted to write Chaos Action for HBase Chaos Monkey (something like
> RestartActiveMaster
>  src/test/java/org/apache/hadoop/hbase/chaos/actions/
> RestartActiveMasterAction.java>
>  )  which can trigger NN Failover.
>
> For that i was going through HAAdmin.java. Is there any way I can use
> function like HAAdmin#failover , HAAdmin#getServiceState from HAAdmin
> class.
>
> Can someone guide me how do i use them?
>
> Thanks,
> Mihir Monani
>
>
>


Re: Use HAAdmin API

2017-10-19 Thread Arpit Agarwal
Mihir,

HAAdmin is a private interface. Most of its functionality is exposed via the 
‘hdfs haadmin’ command [1]. Will that work for you?

1. 
https://hadoop.apache.org/docs/r2.7.0/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin




On 10/17/17, 4:28 AM, "Mihir Monani"  wrote:

I wanted to write Chaos Action for HBase Chaos Monkey (something like
RestartActiveMaster


 )  which can trigger NN Failover.

For that i was going through HAAdmin.java. Is there any way I can use
function like HAAdmin#failover , HAAdmin#getServiceState from HAAdmin
class.

Can someone guide me how do i use them?

Thanks,
Mihir Monani



-
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org



Use HAAdmin API

2017-10-17 Thread Mihir Monani
I wanted to write Chaos Action for HBase Chaos Monkey (something like
RestartActiveMaster

 )  which can trigger NN Failover.

For that i was going through HAAdmin.java. Is there any way I can use
function like HAAdmin#failover , HAAdmin#getServiceState from HAAdmin
class.

Can someone guide me how do i use them?

Thanks,
Mihir Monani


How to Use HAAdmin API

2017-10-16 Thread Mihir Monani
Hi,

I was going thourgh HAAdmin.java to see how can i get list of Active NN
name ( like nn1) or make Failover (-failover nn1 nn2).

As the class's methods are protected or private, It was not possible to use
them as part of simple Java Program which can do action like Failover, Fine
Active NN.

Is there any API i can use for above mentioned purpose?

Thanks,
Mihir Monani