|
|
-
Recommended way to check if namenode already formatted
Stephen Boesch 2012-08-09, 23:04
Hi, what's your take? I was thinking to check if a certain always-present file exists via a hadoop dfs -ls <file> . Other suggestions welcome.
thanks
stephenb
+
Stephen Boesch 2012-08-09, 23:04
-
Re: Recommended way to check if namenode already formatted
Harsh J 2012-08-09, 23:41
Stephen,
A NameNode can be considered 'formatted' if its up (it does not start otherwise).
If you mean to check if the NameNode has been _freshly_ formatted, then checking the count of "hadoop fs -ls /" to be non-zero may help, cause by default the NameNode carries no files.
$ hadoop fs -ls / | wc -l 0
On Fri, Aug 10, 2012 at 4:34 AM, Stephen Boesch <[EMAIL PROTECTED]> wrote: > > Hi, what's your take? I was thinking to check if a certain always-present > file exists via a hadoop dfs -ls <file> . Other suggestions welcome. > > thanks > > stephenb
-- Harsh J
+
Harsh J 2012-08-09, 23:41
-
Re: Recommended way to check if namenode already formatted
Frederick Kautz 2012-08-09, 23:48
Also, VERSION appears in the operating system's filesystem, not on HDFS.
Check out the dfs.name.dir property in ${HADOOP_HOME}/conf/hdfs-site.xml for the location. The file is current/VERSION.
On Thu, Aug 9, 2012 at 4:41 PM, Harsh J <[EMAIL PROTECTED]> wrote:
> Stephen, > > A NameNode can be considered 'formatted' if its up (it does not start > otherwise). > > If you mean to check if the NameNode has been _freshly_ formatted, > then checking the count of "hadoop fs -ls /" to be non-zero may help, > cause by default the NameNode carries no files. > > $ hadoop fs -ls / | wc -l > 0 > > On Fri, Aug 10, 2012 at 4:34 AM, Stephen Boesch <[EMAIL PROTECTED]> wrote: > > > > Hi, what's your take? I was thinking to check if a certain > always-present > > file exists via a hadoop dfs -ls <file> . Other suggestions welcome. > > > > thanks > > > > stephenb > > > > -- > Harsh J >
+
Frederick Kautz 2012-08-09, 23:48
-
Re: Recommended way to check if namenode already formatted
Mohammad Tariq 2012-08-09, 23:11
Hello Stephen,
You can use the VERSION file to verify that.
Regards, Mohammad Tariq On Fri, Aug 10, 2012 at 4:34 AM, Stephen Boesch <[EMAIL PROTECTED]> wrote: > > Hi, what's your take? I was thinking to check if a certain always-present > file exists via a hadoop dfs -ls <file> . Other suggestions welcome. > > thanks > > stephenb
+
Mohammad Tariq 2012-08-09, 23:11
-
Re: Recommended way to check if namenode already formatted
Stephen Boesch 2012-08-09, 23:36
Hi, VERSION does not appear to show up when running "hadoop dfs -lsr /" it displays the files previously placed into hdfs . but nothing about VERSION. I can see the VERSION file on the datanodes under the hdfs managed data directoy
find /data | xargs ls -lrta | grep VERSION -rw-rw-r-- 1 hdfs hdfs 154 Aug 9 16:28 /data/1/dfs/dn/current/VERSION -rw-rw-r-- 1 hdfs hdfs 154 Aug 9 16:28 /data/2/dfs/dn/current/VERSION -rw-rw-r-- 1 hdfs hdfs 154 Aug 9 16:28 /data/3/dfs/dn/current/VERSION -rw-rw-r-- 1 hdfs hdfs 154 Aug 9 16:28 VERSION -rw-rw-r-- 1 hdfs hdfs 154 Aug 9 16:28 VERSION -rw-rw-r-- 1 hdfs hdfs 154 Aug 9 16:28 VERSION
But using hadoop dfs does not see it ? 2012/8/9 Mohammad Tariq <[EMAIL PROTECTED]>
> Hello Stephen, > > You can use the VERSION file to verify that. > > Regards, > Mohammad Tariq > > > On Fri, Aug 10, 2012 at 4:34 AM, Stephen Boesch <[EMAIL PROTECTED]> wrote: > > > > Hi, what's your take? I was thinking to check if a certain > always-present > > file exists via a hadoop dfs -ls <file> . Other suggestions welcome. > > > > thanks > > > > stephenb >
+
Stephen Boesch 2012-08-09, 23:36
|
|