hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Ivan.Nov...@emc.com>
Subject Re: formatting hdfs without user interaction
Date Fri, 23 Sep 2011 15:52:35 GMT
Hi Harsh,

On 9/22/11 8:48 PM, "Harsh J" <harsh@cloudera.com> wrote:

>Ivan,
>
>Writing your own program was overkill.
>
>The 'yes' coreutil is pretty silly, but nifty at the same time. It
>accepts an argument, which it would repeat infinitely.
>
>So:
>
>$ yes Y | hadoop namenode -format
>
>Would do it for you.

Nice!  I read the man page for yes too quickly and did not see that
option.  Thanks!


>(Note that in the future release, saner answers will be acceptable,
>i.e. y instead of strictly Y, etc.)

Y/y/yes/YES would all seem like good things to accept :)


>Also, two other things:
>
>- What do you mean by 'Yeah I have a secondary namenode as well so 2
>directories.'? A secondary namenode uses different directories than
>dfs.name.dir.

Which parameter are you referring to? I am planning on using 2 directories
in dfs.name.dir, one is local and the other is an NFS mount of a 2nd
machine running the secondary namenode.


>- The prompt only appears when it detects a 'reformat' being happening
>- which is very dangerous to do non-interactively. If you do the
>-format the first time, on clean dfs.name.dir setups, you will never
>receive a prompt.

Yeah I am creating some automation, so it needs to be able to wipe out an
existing filesystem and start over......


Cheers,
Ivan



>


Mime
View raw message