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

Ravi Prakash commented on HDFS-2011:
------------------------------------

{quote}
Oh, and in that last bit of code, if fc is still open I would think it should 
be closed after the truncate. But it isn't in the current code. Can you see a 
reason why?
{quote}

I don't know how File Channels work, but in the constructor you can see that fc 
and fp are both derived from the same RandomAccessFile (rp). Could calling 
fp.close() automatically close fc too?


{quote}
Ravi, I don't think this collides with HDFS-988, but please check.
{quote}
diffstat's didn't have any common files. 
{noformat}
$ diffstat hdfs-988-7.patch 
 java/org/apache/hadoop/hdfs/DFSOutputStream.java                               
 |    5 
 java/org/apache/hadoop/hdfs/server/namenode/BlockManager.java                  
 |    5 
 java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java                   
 |  804 ++--
 java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java               
 |   10 
 java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java                  
 | 1891 +++++-----
 java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java                  
 |    1 
 test/hdfs/org/apache/hadoop/cli/TestHDFSCLI.java                               
 |    2 
 test/hdfs/org/apache/hadoop/hdfs/DFSTestUtil.java                              
 |    9 
 test/hdfs/org/apache/hadoop/hdfs/TestDecommission.java                         
 |    6 
 test/hdfs/org/apache/hadoop/hdfs/TestSafeMode.java                             
 |  208 -
 test/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNodeAdapter.java          
 |   15 
 test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestDeadDatanode.java         
 |    9 
 test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestHeartbeatHandling.java    
 |    8 
 
test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNNThroughputBenchmark.java 
|    1 
 test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestSafeMode.java             
 |   90 
 test/unit/org/apache/hadoop/hdfs/server/namenode/TestNNLeaseRecovery.java      
 |   39 
 16 files changed, 1676 insertions(+), 1427 deletions(-)
$ diffstat HDFS-2011.6.patch 
 java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java |   
31 +++-
 java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java               |    
6 
 test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java     |   
67 ++++++++++
 3 files changed, 94 insertions(+), 10 deletions(-)
{noformat}
test-patch passed and I also ran my automated test twice just to be sure. 
Functionality doesn't seem to have collided.



> Removal and restoration of storage directories on checkpointing failure 
> doesn't work properly
> ---------------------------------------------------------------------------------------------
>
>                 Key: HDFS-2011
>                 URL: https://issues.apache.org/jira/browse/HDFS-2011
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.23.0
>            Reporter: Ravi Prakash
>            Assignee: Ravi Prakash
>         Attachments: HDFS-2011.3.patch, HDFS-2011.4.patch, HDFS-2011.5.patch, 
> HDFS-2011.6.patch, HDFS-2011.patch, HDFS-2011.patch, HDFS-2011.patch
>
>
> Removal and restoration of storage directories on checkpointing failure 
> doesn't work properly. Sometimes it throws a NullPointerException and 
> sometimes it doesn't take off a failed storage directory

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

        

Reply via email to