hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milind Bhandarkar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-714) Namenode format does not work when hadoop is installed for first time
Date Tue, 14 Nov 2006 18:19:38 GMT
    [ http://issues.apache.org/jira/browse/HADOOP-714?page=comments#action_12449720 ] 
            
Milind Bhandarkar commented on HADOOP-714:
------------------------------------------

This bug has been fixed. Please take a look at http://issues.apache.org/jira/browse/HADOOP-682
Thanks.


> Namenode format does not work when hadoop is installed for first time
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-714
>                 URL: http://issues.apache.org/jira/browse/HADOOP-714
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.8.0
>         Environment: Linux CentOS 4
>            Reporter: Lei Chen
>             Fix For: 0.9.0
>
>
> The namenode can not be formatted for the first time installation. There is a bug is
the main function of org.apache.hadoop.dfs.NameNode class. The code will skip formatting when
the directory for name does not exist. There is a possible fix for the bug
> 			if (argv.length == 1 && argv[0].equals("-format")) {
> 				boolean aborted = false;
> 				File[] dirs = getDirs(conf);
> 				for (int idx = 0; idx < dirs.length; idx++) {
> 					if (dirs[idx].exists()) {
> 						System.err.print("Re-format filesystem in " + dirs[idx]
> 								+ " ? (Y or N) ");
> 						if (!(System.in.read() == 'Y')) {
> 							System.err
> 									.println("Format aborted in " + dirs[idx]);
> 							aborted = true;
> 						} else {
> 							System.out.println("do format"
> 									+ dirs[idx].getAbsolutePath());
> 							format(dirs[idx]);
> 							System.err.println("Formatted " + dirs[idx]);
> 						}
> 						System.in.read(); // discard the enter-key
> 					} else {
> 						System.out.println("do format"
> 								+ dirs[idx].getAbsolutePath());
> 						format(dirs[idx]);
> 						System.err.println("Formatted " + dirs[idx]);
> 					}
> 				}
> 				System.exit(aborted ? 1 : 0);
> 			}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message