Issue Details (XML | Word | Printable)

Key: HADOOP-3409
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Hairong Kuang
Reporter: Hairong Kuang
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

NameNode should save the root inode into fsimage

Created: 16/May/08 10:16 PM   Updated: 08/Jul/09 04:43 PM
Return to search
Component/s: None
Affects Version/s: 0.16.4
Fix Version/s: 0.18.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works rootImage.patch 2008-05-17 12:04 AM Hairong Kuang 5 kB
Text File Licensed for inclusion in ASF works rootImage1.patch 2008-05-19 06:12 PM Hairong Kuang 6 kB
Issue Links:
Dependants
 

Hadoop Flags: Reviewed
Resolution Date: 19/May/08 08:36 PM


 Description  « Hide
Currently namenode does not save the root inode into the image. Therefore the root's attributes like modification time, permission, and quota in the future are not persistent.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Hairong Kuang added a comment - 17/May/08 12:04 AM
A patch that attempts to fix the problem.

Tsz Wo (Nicholas), SZE added a comment - 17/May/08 12:29 AM
Is it correct that root path has (path.length() == 0) ?

dhruba borthakur added a comment - 18/May/08 08:06 AM
In this patch, the loadFSImage method does the following:

if (path.length() == 0) {
// assume that this is the root inode.
}

will it be more explicit if we replace the above piece of code with the following:

if (i == 0) {
// the first entry is always the root inode.
}


Hairong Kuang added a comment - 19/May/08 04:11 PM
if we take Dhruba's suggestion, then we need to bump up the image version number.

Hairong Kuang added a comment - 19/May/08 05:07 PM
> is it correct that root path has (path.length() == 0)
This how INode.isRoot() is implemented.

Hairong Kuang added a comment - 19/May/08 06:12 PM
This is a patch with a modified unit test that makes sure that the root is saved to the disk.

Hadoop QA added a comment - 19/May/08 07:57 PM
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12382323/rootImage1.patch
against trunk revision 657903.

+1 @author. The patch does not contain any @author tags.

+1 tests included. The patch appears to include 3 new or modified tests.

+1 javadoc. The javadoc tool did not generate any warning messages.

+1 javac. The applied patch does not increase the total number of javac compiler warnings.

+1 findbugs. The patch does not introduce any new Findbugs warnings.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2499/console

This message is automatically generated.


Tsz Wo (Nicholas), SZE added a comment - 19/May/08 08:21 PM
+1 patch looks good.

Hairong Kuang added a comment - 19/May/08 08:36 PM
I just committed this.

Hudson added a comment - 22/May/08 12:24 PM