hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lei (Eddy) Xu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-8834) TestReplication#testReplicationWhenBlockCorruption is not valid after HDFS-6482
Date Wed, 29 Jul 2015 00:01:05 GMT
Lei (Eddy) Xu created HDFS-8834:
-----------------------------------

             Summary: TestReplication#testReplicationWhenBlockCorruption is not valid after
HDFS-6482
                 Key: HDFS-8834
                 URL: https://issues.apache.org/jira/browse/HDFS-8834
             Project: Hadoop HDFS
          Issue Type: Test
          Components: datanode
    Affects Versions: 2.7.1
            Reporter: Lei (Eddy) Xu
            Assignee: Lei (Eddy) Xu
            Priority: Minor


{{TestReplication#testReplicationWhenBlockCorruption}} assumes DN has one level of directory:
{code}
File[] listFiles = participatedNodeDirs.listFiles();
{code}

However, HDFS-6482 changed the layout of block directories and used two level directories,
which makes the following code invalidate (not running).

{code}
for (File file : listFiles) {
        if (file.getName().startsWith(Block.BLOCK_FILE_PREFIX)
            && !file.getName().endsWith("meta")) {
          blockFile = file.getName();
          for (File file1 : nonParticipatedNodeDirs) {
            file1.mkdirs();
            new File(file1, blockFile).createNewFile();
            new File(file1, blockFile + "_1000.meta").createNewFile();
          }
          break;
        }
      }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message