You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Debraj Manna <su...@gmail.com> on 2020/05/02 07:01:27 UTC

How to identify active namenode?

Hi

Can someone let me know how can I identify which is an active namenode?

Thanks,

Re: How to identify active namenode?

Posted by Debraj Manna <su...@gmail.com>.
This approach <https://stackoverflow.com/a/61556389/785523> worked for me
in 2.6.0.

On Sat, May 2, 2020 at 1:39 PM Debraj Manna <su...@gmail.com>
wrote:

> I am using HDFS 2.6.0. I checked
> https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#dfsadmin but
> did not see any option for getting active namenode.
>
> I am looking for a command-line approach.
>
> On Sat, May 2, 2020 at 12:43 PM Ayush Saxena <ay...@gmail.com> wrote:
>
>> Hi Debraj,
>> There is a command in haadmin -getAllServiceState, You can use that.
>> Can read this for details :
>>
>> https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin
>> In the namenode UI also you can see the state of the namenode.
>>
>> -Ayush
>>
>>
>> On Sat, 2 May 2020 at 12:32, Debraj Manna <su...@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> Can someone let me know how can I identify which is an active namenode?
>>>
>>> Thanks,
>>>
>>>

Re: How to identify active namenode?

Posted by Wei-Chiu Chuang <we...@apache.org>.
You can also check the namenode status through the namenode web UI/JMX.

On Sat, May 2, 2020 at 1:27 AM Ayush Saxena <ay...@gmail.com> wrote:

> Hi,
> Can you check :
>
> https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html#Administrative_commands
>
> You can use [-getServiceState <serviceId>]
>
> -Ayush
>
>
> On Sat, 2 May 2020 at 13:39, Debraj Manna <su...@gmail.com>
> wrote:
>
>> I am using HDFS 2.6.0. I checked
>> https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#dfsadmin but
>> did not see any option for getting active namenode.
>>
>> I am looking for a command-line approach.
>>
>> On Sat, May 2, 2020 at 12:43 PM Ayush Saxena <ay...@gmail.com> wrote:
>>
>>> Hi Debraj,
>>> There is a command in haadmin -getAllServiceState, You can use that.
>>> Can read this for details :
>>>
>>> https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin
>>> In the namenode UI also you can see the state of the namenode.
>>>
>>> -Ayush
>>>
>>>
>>> On Sat, 2 May 2020 at 12:32, Debraj Manna <su...@gmail.com>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> Can someone let me know how can I identify which is an active namenode?
>>>>
>>>> Thanks,
>>>>
>>>>

Re: How to identify active namenode?

Posted by Ayush Saxena <ay...@gmail.com>.
Hi,
Can you check :
https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html#Administrative_commands

You can use [-getServiceState <serviceId>]

-Ayush


On Sat, 2 May 2020 at 13:39, Debraj Manna <su...@gmail.com> wrote:

> I am using HDFS 2.6.0. I checked
> https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#dfsadmin but
> did not see any option for getting active namenode.
>
> I am looking for a command-line approach.
>
> On Sat, May 2, 2020 at 12:43 PM Ayush Saxena <ay...@gmail.com> wrote:
>
>> Hi Debraj,
>> There is a command in haadmin -getAllServiceState, You can use that.
>> Can read this for details :
>>
>> https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin
>> In the namenode UI also you can see the state of the namenode.
>>
>> -Ayush
>>
>>
>> On Sat, 2 May 2020 at 12:32, Debraj Manna <su...@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> Can someone let me know how can I identify which is an active namenode?
>>>
>>> Thanks,
>>>
>>>

Re: How to identify active namenode?

Posted by Debraj Manna <su...@gmail.com>.
I am using HDFS 2.6.0. I checked
https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#dfsadmin
but
did not see any option for getting active namenode.

I am looking for a command-line approach.

On Sat, May 2, 2020 at 12:43 PM Ayush Saxena <ay...@gmail.com> wrote:

> Hi Debraj,
> There is a command in haadmin -getAllServiceState, You can use that.
> Can read this for details :
>
> https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin
> In the namenode UI also you can see the state of the namenode.
>
> -Ayush
>
>
> On Sat, 2 May 2020 at 12:32, Debraj Manna <su...@gmail.com>
> wrote:
>
>> Hi
>>
>> Can someone let me know how can I identify which is an active namenode?
>>
>> Thanks,
>>
>>

Re: How to identify active namenode?

Posted by Ayush Saxena <ay...@gmail.com>.
Hi Debraj,
There is a command in haadmin -getAllServiceState, You can use that.
Can read this for details :
https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin
In the namenode UI also you can see the state of the namenode.

-Ayush


On Sat, 2 May 2020 at 12:32, Debraj Manna <su...@gmail.com> wrote:

> Hi
>
> Can someone let me know how can I identify which is an active namenode?
>
> Thanks,
>
>