you could try
echo yes | bin/hadoop namenode -format
--
Arpit
ar...@hortonworks.com
On Sep 22, 2011, at 2:43 PM, wrote:
> Hello,
>
> I am trying to automate formatting an HDFS volume. Is there any way to do
> this without the interaction (and using expect)?
>
> Cheers,
> Ivan
Ian
"echo 'Y' | hadoop namenode -format"
should work.,
Raj
>
>From: "ivan.nov...@emc.com"
>To: common-user@hadoop.apache.org
>Sent: Thursday, September 22, 2011 2:43 PM
>Subject: formatting hdfs without user interaction
>
>Hello,
>
>I am trying to automate form
Hi Raj and Arpit,
I think the fact that there are 2 confirmations is causing it not to work:
echo "Y" | hadoop namenode -format
11/09/22 14:57:10 INFO namenode.NameNode: STARTUP_MSG:
/
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host =
ptember 22, 2011 6:00 PM
To: common-user@hadoop.apache.org; rajv...@yahoo.com
Subject: Re: formatting hdfs without user interaction
Hi Raj and Arpit,
I think the fact that there are 2 confirmations is causing it not to work:
echo "Y" | hadoop namenode -format
11/
The reason you are getting multiple prompts is that you have multiple dir's
defined in the dfs.name.dir.
A simple expect script would take care of this.
#!/usr/bin/expect -f
spawn /bin/hadoop namenode -format
expect "Re-format filesystem in"
send Y\n
expect "Re-format filesystem in"
send Y\n
Yeah I have a secondary namenode as well so 2 directories.
I was trying to avoid expect if possible. But this is always an option.
Cheers,
Ivan
On 9/22/11 3:17 PM, "Arpit Gupta" wrote:
>The reason you are getting multiple prompts is that you have multiple
>dir's defined in the dfs.name.dir
-format
>
>The "yes" program simply outputs 'y' a bunch of times. "echo yes" will
>just print "yes" to stdout.
>
>-- Adam
>
>-Original Message-
>From: ivan.nov...@emc.com [mailto:ivan.nov...@emc.com]
>Sent: Thursday, Septembe
;yes" program simply outputs 'y' a bunch of times. "echo yes" will
>>just print "yes" to stdout.
>>
>>-- Adam
>>
>>-----Original Message-
>>From: ivan.nov...@emc.com [mailto:ivan.nov...@emc.com]
>>Sent: Thu
Hi Harsh,
On 9/22/11 8:48 PM, "Harsh J" 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!
On Fri, Sep 23, 2011 at 11:52 AM, wrote:
> Hi Harsh,
>
> On 9/22/11 8:48 PM, "Harsh J" 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:
>
On 9/23/11 9:01 AM, "Edward Capriolo" wrote:
>On Fri, Sep 23, 2011 at 11:52 AM, wrote:
>
>> Hi Harsh,
>>
>> On 9/22/11 8:48 PM, "Harsh J" wrote:
>>
>> >Ivan,
>> >
>> >Writing your own program was overkill.
>> >
>> >The 'yes' coreutil is pretty silly, but nifty at the same time. It
>> >accepts
Ivan,
On Fri, Sep 23, 2011 at 9:22 PM, wrote:
[snip]
> 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.
I'm slightly confused here. Do you mean to say a 'Se
On 9/23/11 9:46 AM, "Harsh J" wrote:
>Ivan,
>
>On Fri, Sep 23, 2011 at 9:22 PM, wrote:
>[snip]
>> 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.
>
>I'
13 matches
Mail list logo