hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1001105 - in /hadoop/hdfs/trunk: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
Date Fri, 24 Sep 2010 23:05:01 GMT
Author: suresh
Date: Fri Sep 24 23:05:00 2010
New Revision: 1001105

URL: http://svn.apache.org/viewvc?rev=1001105&view=rev
Log:
HDFS-1417. Add @Override to SimulatedFSDataset methods that implement FSDatasetInterface methods.
Contributed by Suresh Srinivas.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1001105&r1=1001104&r2=1001105&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Fri Sep 24 23:05:00 2010
@@ -138,6 +138,9 @@ Trunk (unreleased changes)
     HDFS-1407. Change DataTransferProtocol methods to use Block instead 
     of individual elements of Block. (suresh)
 
+    HDFS-1417. Add @Override to SimulatedFSDataset methods that implement
+    FSDatasetInterface methods. (suresh)
+
   OPTIMIZATIONS
 
     HDFS-1140. Speedup INode.getPathComponents. (Dmytro Molkov via shv)

Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java?rev=1001105&r1=1001104&r2=1001105&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
(original)
+++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/SimulatedFSDataset.java
Fri Sep 24 23:05:00 2010
@@ -65,7 +65,7 @@ public class SimulatedFSDataset  impleme
                                     "dfs.datanode.simulateddatastorage";
   public static final String CONFIG_PROPERTY_CAPACITY =
                             "dfs.datanode.simulateddatastorage.capacity";
-  
+//  
   public static final long DEFAULT_CAPACITY = 2L<<40; // 1 terabyte
   public static final byte DEFAULT_DATABYTE = 9; // 1 terabyte
   byte simulatedDataByte = DEFAULT_DATABYTE;
@@ -302,9 +302,6 @@ public class SimulatedFSDataset  impleme
     setConf(conf);
   }
   
-  private SimulatedFSDataset() { // real construction when setConf called.. Uggg
-  }
-  
   public Configuration getConf() {
     return conf;
   }
@@ -346,6 +343,7 @@ public class SimulatedFSDataset  impleme
     }
   }
 
+  @Override
   public synchronized void finalizeBlock(Block b) throws IOException {
     BInfo binfo = blockMap.get(b);
     if (binfo == null) {
@@ -355,12 +353,14 @@ public class SimulatedFSDataset  impleme
 
   }
 
+  @Override
   public synchronized void unfinalizeBlock(Block b) throws IOException {
     if (isBeingWritten(b)) {
       blockMap.remove(b);
     }
   }
 
+  @Override
   public synchronized BlockListAsLongs getBlockReport() {
     Block[] blockTable = new Block[blockMap.size()];
     int count = 0;
@@ -388,6 +388,7 @@ public class SimulatedFSDataset  impleme
     return storage.getFree();
   }
 
+  @Override
   public synchronized long getLength(Block b) throws IOException {
     BInfo binfo = blockMap.get(b);
     if (binfo == null) {
@@ -402,7 +403,7 @@ public class SimulatedFSDataset  impleme
     return blockMap.get(new Block(blockId));
   }
 
-  /** {@inheritDoc} */
+  @Override
   public Block getStoredBlock(long blkid) throws IOException {
     Block b = new Block(blkid);
     BInfo binfo = blockMap.get(b);
@@ -414,6 +415,7 @@ public class SimulatedFSDataset  impleme
     return b;
   }
 
+  @Override
   public synchronized void invalidate(Block[] invalidBlks) throws IOException {
     boolean error = false;
     if (invalidBlks == null) {
@@ -437,6 +439,7 @@ public class SimulatedFSDataset  impleme
       }
   }
 
+  @Override
   public synchronized boolean isValidBlock(Block b) {
     // return (blockMap.containsKey(b));
     BInfo binfo = blockMap.get(b);
@@ -544,6 +547,7 @@ public class SimulatedFSDataset  impleme
     return binfo;
   }
 
+  @Override
   public synchronized InputStream getBlockInputStream(Block b)
                                             throws IOException {
     BInfo binfo = blockMap.get(b);
@@ -555,6 +559,7 @@ public class SimulatedFSDataset  impleme
     return binfo.getIStream();
   }
   
+  @Override
   public synchronized InputStream getBlockInputStream(Block b, long seekOffset)
                               throws IOException {
     InputStream result = getBlockInputStream(b);
@@ -563,6 +568,7 @@ public class SimulatedFSDataset  impleme
   }
 
   /** Not supported */
+  @Override
   public BlockInputStreams getTmpInputStreams(Block b, long blkoff, long ckoff
       ) throws IOException {
     throw new IOException("Not supported");
@@ -587,7 +593,8 @@ public class SimulatedFSDataset  impleme
     }
     return binfo.getMetaIStream();
   }
-
+ 
+  @Override
   public synchronized long getMetaDataLength(Block b) throws IOException {
     BInfo binfo = blockMap.get(b);
     if (binfo == null) {
@@ -600,6 +607,7 @@ public class SimulatedFSDataset  impleme
     return binfo.getMetaIStream().getLength();
   }
   
+  @Override
   public MetaDataInputStream getMetaDataInputStream(Block b)
   throws IOException {
 
@@ -607,6 +615,7 @@ public class SimulatedFSDataset  impleme
                                                 getMetaDataLength(b));
   }
 
+  @Override
   public synchronized boolean metaFileExists(Block b) throws IOException {
     if (!isValidBlock(b)) {
           throw new IOException("Block " + b +



Mime
View raw message