hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From be...@apache.org
Subject git commit: HDFS-6799. The invalidate method in SimulatedFSDataset failed to remove (invalidate) blocks from the file system. Contributed by Megasthenis Asteris.
Date Tue, 16 Sep 2014 23:22:46 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 7971c97ec -> 02adf7185


HDFS-6799. The invalidate method in SimulatedFSDataset failed to remove (invalidate) blocks
from the file system. Contributed by Megasthenis Asteris.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/02adf718
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/02adf718
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/02adf718

Branch: refs/heads/trunk
Commit: 02adf7185de626492bba2b3718959457e958a7be
Parents: 7971c97
Author: Benoy Antony <benoy@apache.org>
Authored: Tue Sep 16 16:24:23 2014 -0700
Committer: Benoy Antony <benoy@apache.org>
Committed: Tue Sep 16 16:24:23 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hdfs/server/datanode/SimulatedFSDataset.java       | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/02adf718/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
index 8ad4510..d0fad6e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
@@ -482,9 +482,10 @@ public class SimulatedFSDataset implements FsDatasetSpi<FsVolumeSpi>
{
   }
 
   @Override // FsDatasetSpi
-  public synchronized void unfinalizeBlock(ExtendedBlock b) {
+  public synchronized void unfinalizeBlock(ExtendedBlock b) throws IOException{
     if (isValidRbw(b)) {
-      blockMap.remove(b.getLocalBlock());
+      final Map<Block, BInfo> map = getMap(b.getBlockPoolId());
+      map.remove(b.getLocalBlock());
     }
   }
 
@@ -624,7 +625,7 @@ public class SimulatedFSDataset implements FsDatasetSpi<FsVolumeSpi>
{
         continue;
       }
       storage.free(bpid, binfo.getNumBytes());
-      blockMap.remove(b);
+      map.remove(b);
     }
     if (error) {
       throw new IOException("Invalidate: Missing blocks.");


Mime
View raw message