hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2170) 1073: Address remaining TODOs
Date Tue, 19 Jul 2011 20:46:57 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067953#comment-13067953
] 

Todd Lipcon commented on HDFS-2170:
-----------------------------------

in FSImage.java:
{code}
       throw new IOException(
         "Failed to save in any storage directories while saving namespace.");
     }
-    // TODO Double-check for regressions against HDFS-1505 and HDFS-1921.
{code}
I double checked those patches and think this TODO has been addressed already. HDFS-1505 is
covered by unit tests in TestSaveNamespace, and HDFS-1921 has to do with the coordination
of the {{lastcheckpoint}} dirs which no longer exist.

In TestEditLogRace.java:
{code}
         // The checkpoint id should be 1 less than the last written ID, since
         // the log roll writes the "BEGIN" transaction to the new log.
-        // TODO: consider making enterSafeMode actually close the edit log
-        // at that point?
         assertEquals(fsimage.getStorage().getMostRecentCheckpointTxId(),
                      editLog.getLastWrittenTxId() - 1);
{code}
This was just an idea -- there aren't any substantial advantages that I can think of at this
point. But, nothing will stop us from doing it later if we find a good reason to make this
change.

In TestParallelImageWrite.java:
{code}
-      /**
-       * TODO the following assertion is no longer valid since the fsimage
-       * includes a transaction ID in its header.
-      assertFalse("Modified namespace doesn't change fsimage contents",
-          !checkAfterRestart.equals(checkAfterModify));
-       */
{code}
When I was working on this test, I was confused about the intent of this assertion. The preceding
lines actually modify the namespace, so the assertion is to make sure that the new saved image
is _different_ than the old saved image. This is still true. I made the assertion stronger
by adding a method that takes the checksum of an image after zeroing out the txid in the header,
as well.

Patch momentarily.

> 1073: Address remaining TODOs
> -----------------------------
>
>                 Key: HDFS-2170
>                 URL: https://issues.apache.org/jira/browse/HDFS-2170
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>    Affects Versions: Edit log branch (HDFS-1073)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: Edit log branch (HDFS-1073)
>
>         Attachments: hdfs-2170.txt
>
>
> This is the last sweep of TODOs in the 1073 branch. Just a few things needed to be cleaned
up, no real changes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message