Re: formatting hdfs without user interaction

2011-09-22 Thread Arpit Gupta
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

Re: formatting hdfs without user interaction

2011-09-22 Thread Raj V
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

Re: formatting hdfs without user interaction

2011-09-22 Thread Ivan.Novick
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 =

RE: formatting hdfs without user interaction

2011-09-22 Thread Adam Shook
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/

Re: formatting hdfs without user interaction

2011-09-22 Thread Arpit Gupta
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

Re: formatting hdfs without user interaction

2011-09-22 Thread Ivan.Novick
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

Re: formatting hdfs without user interaction

2011-09-22 Thread Ivan.Novick
-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

Re: formatting hdfs without user interaction

2011-09-22 Thread Harsh J
;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

Re: formatting hdfs without user interaction

2011-09-23 Thread Ivan.Novick
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!

Re: formatting hdfs without user interaction

2011-09-23 Thread Edward Capriolo
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: >

Re: formatting hdfs without user interaction

2011-09-23 Thread Ivan.Novick
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

Re: formatting hdfs without user interaction

2011-09-23 Thread Harsh J
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

Re: formatting hdfs without user interaction

2011-09-23 Thread Ivan.Novick
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'