From f2f4e9341387199e04679ebc8de5e05c0fdbd437 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Tue, 13 Dec 2011 18:07:29 +0000 Subject: [PATCH] HDFS-2650. Replace @inheritDoc with @Override. Contributed by Hari Mankude. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1213813 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 17 +++++++++-------- .../hadoop/hdfs/CorruptFileBlockIterator.java | 8 ++------ .../java/org/apache/hadoop/hdfs/DFSClient.java | 5 ++--- .../hadoop/hdfs/DistributedFileSystem.java | 17 +++-------------- .../org/apache/hadoop/hdfs/HftpFileSystem.java | 8 ++++---- .../hdfs/protocol/CorruptFileBlocks.java | 18 ++++++------------ .../hadoop/hdfs/protocol/DatanodeID.java | 4 ++-- .../hadoop/hdfs/protocol/DatanodeInfo.java | 4 ++-- .../hadoop/hdfs/protocol/LocatedBlock.java | 2 +- .../hadoop/hdfs/protocol/LocatedBlocks.java | 1 - .../BlockInfoUnderConstruction.java | 2 -- .../BlockPlacementPolicyDefault.java | 9 ++++----- .../hadoop/hdfs/server/datanode/DataNode.java | 5 ++--- .../server/datanode/FSDatasetInterface.java | 2 +- .../server/namenode/ContentSummaryServlet.java | 2 +- .../namenode/EditLogFileOutputStream.java | 1 - .../server/namenode/FileChecksumServlets.java | 4 ++-- .../hadoop/hdfs/server/namenode/INode.java | 4 ++-- .../hdfs/server/namenode/INodeDirectory.java | 4 ++-- .../hadoop/hdfs/server/namenode/INodeFile.java | 2 +- .../hdfs/server/namenode/LeaseManager.java | 10 +++++----- .../hdfs/server/namenode/NamenodeFsck.java | 2 +- .../server/namenode/SecondaryNameNode.java | 2 +- .../server/namenode/SerialNumberManager.java | 2 +- .../server/protocol/DatanodeRegistration.java | 4 ++-- .../DatanodeRegistrationWritable.java | 4 ++-- 26 files changed, 58 insertions(+), 85 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 1a19ac76e60..e19af25500c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -92,8 +92,8 @@ Trunk (unreleased changes) (suresh) HADOOP-7862 Hdfs changes to work with HADOOP 7862: - Move the support for multiple protocols to lower layer so that Writable, - PB and Avro can all use it (Sanjay) + Move the support for multiple protocols to lower layer so that Writable, + PB and Avro can all use it (Sanjay) HDFS-1580. Add interface for generic Write Ahead Logging mechanisms. (Ivan Kelly via jitendra) @@ -104,16 +104,17 @@ Trunk (unreleased changes) HDFS-2651 ClientNameNodeProtocol Translators for Protocol Buffers (sanjay) + HDFS-2650. Replace @inheritDoc with @Override. (Hari Mankude via suresh). + OPTIMIZATIONS HDFS-2477. Optimize computing the diff between a block report and the - namenode state. (Tomasz Nykiel via hairong) + namenode state. (Tomasz Nykiel via hairong) HDFS-2495. Increase granularity of write operations in ReplicationMonitor thus reducing contention for write lock. (Tomasz Nykiel via hairong) HDFS-2476. More CPU efficient data structure for under-replicated, - over-replicated, and invalidated blocks. - (Tomasz Nykiel via todd) + over-replicated, and invalidated blocks. (Tomasz Nykiel via todd) BUG FIXES HDFS-2299. TestOfflineEditsViewer is failing on trunk. (Uma Maheswara Rao G @@ -136,7 +137,7 @@ Trunk (unreleased changes) info on the console with security enabled. (Arpit Gupta via suresh) HDFS-2349. Corruption detected during block transfers between DNs - should log a WARN instead of INFO. (harsh) + should log a WARN instead of INFO. (harsh) HDFS-2188. Make FSEditLog create its journals from a list of URIs rather than NNStorage. (Ivan Kelly via jitendra) @@ -147,10 +148,10 @@ Trunk (unreleased changes) HDFS-2497 Fix TestBackupNode failure. (suresh) HDFS-2526. (Client)NamenodeProtocolTranslatorR23 do not need to keep a - reference to rpcProxyWithoutRetry (atm) + reference to rpcProxyWithoutRetry (atm) HDFS-2532. TestDfsOverAvroRpc timing out in trunk (Uma Maheswara Rao G - via todd) + via todd) HDFS-2606. webhdfs client filesystem impl must set the content-type header for create/append. (tucu) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/CorruptFileBlockIterator.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/CorruptFileBlockIterator.java index 2fedd6b2cda..bd3fdd56a10 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/CorruptFileBlockIterator.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/CorruptFileBlockIterator.java @@ -81,17 +81,13 @@ public class CorruptFileBlockIterator implements RemoteIterator { } } - /** - * {@inheritDoc} - */ + @Override public boolean hasNext() { return nextPath != null; } - /** - * {@inheritDoc} - */ + @Override public Path next() throws IOException { if (!hasNext()) { diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index fad16274de2..f721c3cf431 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -1689,8 +1689,7 @@ public class DFSClient implements java.io.Closeable { } } - boolean shouldTryShortCircuitRead(InetSocketAddress targetAddr) - throws IOException { + boolean shouldTryShortCircuitRead(InetSocketAddress targetAddr) { if (shortCircuitLocalReads && isLocalAddress(targetAddr)) { return true; } @@ -1713,7 +1712,7 @@ public class DFSClient implements java.io.Closeable { } } - /** {@inheritDoc} */ + @Override public String toString() { return getClass().getSimpleName() + "[clientName=" + clientName + ", ugi=" + ugi + "]"; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java index ea7d4c2b636..9dd6dfd37ed 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java @@ -180,7 +180,7 @@ public class DistributedFileSystem extends FileSystem { workingDir = makeAbsolute(dir); } - /** {@inheritDoc} */ + @Override public Path getHomeDirectory() { return makeQualified(new Path("/user/" + dfs.ugi.getShortUserName())); @@ -307,7 +307,7 @@ public class DistributedFileSystem extends FileSystem { dfs.concat(getPathName(trg), srcs); } - /** {@inheritDoc} */ + @SuppressWarnings("deprecation") @Override public boolean rename(Path src, Path dst) throws IOException { @@ -316,7 +316,6 @@ public class DistributedFileSystem extends FileSystem { } /** - * {@inheritDoc} * This rename operation is guaranteed to be atomic. */ @SuppressWarnings("deprecation") @@ -332,7 +331,6 @@ public class DistributedFileSystem extends FileSystem { return dfs.delete(getPathName(f), recursive); } - /** {@inheritDoc} */ @Override public ContentSummary getContentSummary(Path f) throws IOException { statistics.incrementReadOps(1); @@ -513,7 +511,7 @@ public class DistributedFileSystem extends FileSystem { return dfs.primitiveMkdir(getPathName(f), absolutePermission); } - /** {@inheritDoc} */ + @Override public void close() throws IOException { try { @@ -553,7 +551,6 @@ public class DistributedFileSystem extends FileSystem { } } - /** {@inheritDoc} */ @Override public FsStatus getStatus(Path p) throws IOException { statistics.incrementReadOps(1); @@ -615,9 +612,6 @@ public class DistributedFileSystem extends FileSystem { return dfs.getCorruptBlocksCount(); } - /** - * {@inheritDoc} - */ @Override public RemoteIterator listCorruptFileBlocks(Path path) throws IOException { @@ -695,7 +689,6 @@ public class DistributedFileSystem extends FileSystem { dfs.metaSave(pathname); } - /** {@inheritDoc} */ @Override public FsServerDefaults getServerDefaults() throws IOException { return dfs.getServerDefaults(); @@ -766,14 +759,12 @@ public class DistributedFileSystem extends FileSystem { } } - /** {@inheritDoc} */ @Override public MD5MD5CRC32FileChecksum getFileChecksum(Path f) throws IOException { statistics.incrementReadOps(1); return dfs.getFileChecksum(getPathName(f)); } - /** {@inheritDoc }*/ @Override public void setPermission(Path p, FsPermission permission ) throws IOException { @@ -781,7 +772,6 @@ public class DistributedFileSystem extends FileSystem { dfs.setPermission(getPathName(p), permission); } - /** {@inheritDoc }*/ @Override public void setOwner(Path p, String username, String groupname ) throws IOException { @@ -792,7 +782,6 @@ public class DistributedFileSystem extends FileSystem { dfs.setOwner(getPathName(p), username, groupname); } - /** {@inheritDoc }*/ @Override public void setTimes(Path p, long mtime, long atime ) throws IOException { diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HftpFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HftpFileSystem.java index 7e86b9e8514..7c56d780584 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HftpFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HftpFileSystem.java @@ -529,7 +529,7 @@ public class HftpFileSystem extends FileSystem private class ChecksumParser extends DefaultHandler { private FileChecksum filechecksum; - /** {@inheritDoc} */ + @Override public void startElement(String ns, String localname, String qname, Attributes attrs) throws SAXException { if (!MD5MD5CRC32FileChecksum.class.getName().equals(qname)) { @@ -563,7 +563,7 @@ public class HftpFileSystem extends FileSystem } } - /** {@inheritDoc} */ + @Override public FileChecksum getFileChecksum(Path f) throws IOException { final String s = makeQualified(f).toUri().getPath(); return new ChecksumParser().getFileChecksum(s); @@ -611,7 +611,7 @@ public class HftpFileSystem extends FileSystem private class ContentSummaryParser extends DefaultHandler { private ContentSummary contentsummary; - /** {@inheritDoc} */ + @Override public void startElement(String ns, String localname, String qname, Attributes attrs) throws SAXException { if (!ContentSummary.class.getName().equals(qname)) { @@ -697,7 +697,7 @@ public class HftpFileSystem extends FileSystem } } - /** {@inheritDoc} */ + @Override public ContentSummary getContentSummary(Path f) throws IOException { final String s = makeQualified(f).toUri().getPath(); final ContentSummary cs = new ContentSummaryParser().getContentSummary(s); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java index 7b69f0b1101..44fd387741a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CorruptFileBlocks.java @@ -53,9 +53,7 @@ public class CorruptFileBlocks implements Writable { return cookie; } - /** - * {@inheritDoc} - */ + @Override public void readFields(DataInput in) throws IOException { int fileCount = in.readInt(); @@ -66,9 +64,7 @@ public class CorruptFileBlocks implements Writable { cookie = Text.readString(in); } - /** - * {@inheritDoc} - */ + @Override public void write(DataOutput out) throws IOException { out.writeInt(files.length); @@ -78,9 +74,8 @@ public class CorruptFileBlocks implements Writable { Text.writeString(out, cookie); } - /** - * {@inheritDoc} - */ + + @Override public boolean equals(Object obj) { if (this == obj) { return true; @@ -93,9 +88,8 @@ public class CorruptFileBlocks implements Writable { Arrays.equals(files, other.files); } - /** - * {@inheritDoc} - */ + + @Override public int hashCode() { int result = cookie.hashCode(); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeID.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeID.java index 6bf4481c6c5..21e549d26a1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeID.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeID.java @@ -185,14 +185,14 @@ public class DatanodeID implements WritableComparable { ///////////////////////////////////////////////// // Writable ///////////////////////////////////////////////// - /** {@inheritDoc} */ + @Override public void write(DataOutput out) throws IOException { DeprecatedUTF8.writeString(out, name); DeprecatedUTF8.writeString(out, storageID); out.writeShort(infoPort); } - /** {@inheritDoc} */ + @Override public void readFields(DataInput in) throws IOException { name = DeprecatedUTF8.readString(in); storageID = DeprecatedUTF8.readString(in); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfo.java index 7c52c1f2753..ae908480b9a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfo.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfo.java @@ -382,7 +382,7 @@ public class DatanodeInfo extends DatanodeID implements Node { }); } - /** {@inheritDoc} */ + @Override public void write(DataOutput out) throws IOException { super.write(out); @@ -400,7 +400,7 @@ public class DatanodeInfo extends DatanodeID implements Node { WritableUtils.writeEnum(out, getAdminState()); } - /** {@inheritDoc} */ + @Override public void readFields(DataInput in) throws IOException { super.readFields(in); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java index 797440d60b7..a8ad641e0fa 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java @@ -159,7 +159,7 @@ public class LocatedBlock implements Writable { return lb; } - /** {@inheritDoc} */ + @Override public String toString() { return getClass().getSimpleName() + "{" + b + "; getBlockSize()=" + getBlockSize() diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlocks.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlocks.java index e9c3122d6b3..b8971d64bba 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlocks.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlocks.java @@ -225,7 +225,6 @@ public class LocatedBlocks implements Writable { } } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder b = new StringBuilder(getClass().getSimpleName()); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoUnderConstruction.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoUnderConstruction.java index 29565ace47d..f2f47a251fc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoUnderConstruction.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoUnderConstruction.java @@ -112,7 +112,6 @@ public class BlockInfoUnderConstruction extends BlockInfo { return (this == obj) || super.equals(obj); } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder b = new StringBuilder(getClass().getSimpleName()); @@ -271,7 +270,6 @@ public class BlockInfoUnderConstruction extends BlockInfo { return (this == obj) || super.equals(obj); } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder b = new StringBuilder(super.toString()); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java index 6455b579a6a..ef2a2b32063 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java @@ -63,7 +63,7 @@ public class BlockPlacementPolicyDefault extends BlockPlacementPolicy { BlockPlacementPolicyDefault() { } - /** {@inheritDoc} */ + @Override public void initialize(Configuration conf, FSClusterStats stats, NetworkTopology clusterMap) { this.considerLoad = conf.getBoolean(DFSConfigKeys.DFS_NAMENODE_REPLICATION_CONSIDERLOAD_KEY, true); @@ -79,7 +79,7 @@ public class BlockPlacementPolicyDefault extends BlockPlacementPolicy { } }; - /** {@inheritDoc} */ + @Override public DatanodeDescriptor[] chooseTarget(String srcPath, int numOfReplicas, DatanodeDescriptor writer, @@ -89,7 +89,6 @@ public class BlockPlacementPolicyDefault extends BlockPlacementPolicy { null, blocksize); } - /** {@inheritDoc} */ @Override public DatanodeDescriptor[] chooseTarget(String srcPath, int numOfReplicas, @@ -525,7 +524,7 @@ public class BlockPlacementPolicyDefault extends BlockPlacementPolicy { return nodes; } - /** {@inheritDoc} */ + @Override public int verifyBlockPlacement(String srcPath, LocatedBlock lBlk, int minRacks) { @@ -544,7 +543,7 @@ public class BlockPlacementPolicyDefault extends BlockPlacementPolicy { return minRacks - racks.size(); } - /** {@inheritDoc} */ + @Override public DatanodeDescriptor chooseReplicaToDelete(FSInodeInfo inode, Block block, short replicationFactor, diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java index 96e6944cb57..4cb1d79a38d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java @@ -1888,7 +1888,7 @@ public class DataNode extends Configured return new ExtendedBlock(oldBlock.getBlockPoolId(), r); } - /** {@inheritDoc} */ + @Override public long getProtocolVersion(String protocol, long clientVersion ) throws IOException { if (protocol.equals(InterDatanodeProtocol.class.getName())) { @@ -1921,7 +1921,7 @@ public class DataNode extends Configured this.rInfo = rInfo; } - /** {@inheritDoc} */ + @Override public String toString() { return "block:" + rInfo + " node:" + id; } @@ -2105,7 +2105,6 @@ public class DataNode extends Configured } // ClientDataNodeProtocol implementation - /** {@inheritDoc} */ @Override // ClientDataNodeProtocol public long getReplicaVisibleLength(final ExtendedBlock block) throws IOException { checkWriteAccess(block); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FSDatasetInterface.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FSDatasetInterface.java index 2f05f16c2ff..f4471168903 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FSDatasetInterface.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FSDatasetInterface.java @@ -193,7 +193,7 @@ public interface FSDatasetInterface extends FSDatasetMBean { this.checksumIn = checksumIn; } - /** {@inheritDoc} */ + @Override public void close() { IOUtils.closeStream(dataIn); IOUtils.closeStream(checksumIn); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java index 6ed5f495548..141cdb630aa 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryServlet.java @@ -40,7 +40,7 @@ public class ContentSummaryServlet extends DfsServlet { /** For java.io.Serializable */ private static final long serialVersionUID = 1L; - /** {@inheritDoc} */ + @Override public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final Configuration conf = diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java index 13c76ae1e6c..72c33673168 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileOutputStream.java @@ -71,7 +71,6 @@ class EditLogFileOutputStream extends EditLogOutputStream { fc.position(fc.size()); } - /** {@inheritDoc} */ @Override public void write(FSEditLogOp op) throws IOException { doubleBuf.writeOp(op); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java index 023e3b612e9..7bd1f271834 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java @@ -80,7 +80,7 @@ public class FileChecksumServlets { dtParam + addrParam); } - /** {@inheritDoc} */ + @Override public void doGet(HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { final ServletContext context = getServletContext(); @@ -104,7 +104,7 @@ public class FileChecksumServlets { /** For java.io.Serializable */ private static final long serialVersionUID = 1L; - /** {@inheritDoc} */ + @Override public void doGet(HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { final PrintWriter out = response.getWriter(); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java index 9885f23f92a..c4bc1cc4646 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java @@ -261,13 +261,13 @@ public abstract class INode implements Comparable, FSInodeInfo { this.name = name; } - /** {@inheritDoc} */ + @Override public String getFullPathName() { // Get the full path name of this inode. return FSDirectory.getFullPathName(this); } - /** {@inheritDoc} */ + @Override public String toString() { return "\"" + getFullPathName() + "\":" + getUserName() + ":" + getGroupName() + ":" diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java index f4d9e78f88f..0f1a8a224db 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java @@ -372,7 +372,7 @@ class INodeDirectory extends INode { return parent; } - /** {@inheritDoc} */ + @Override DirCounts spaceConsumedInTree(DirCounts counts) { counts.nsCount += 1; if (children != null) { @@ -383,7 +383,7 @@ class INodeDirectory extends INode { return counts; } - /** {@inheritDoc} */ + @Override long[] computeContentSummary(long[] summary) { // Walk through the children of this node, using a new summary array // for the (sub)tree rooted at this node diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java index 7077dc12483..2b3a0125fe5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java @@ -168,7 +168,7 @@ public class INodeFile extends INode { return 1; } - /** {@inheritDoc} */ + @Override long[] computeContentSummary(long[] summary) { summary[0] += computeFileSize(true); summary[1]++; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java index 44857739b30..6f034521957 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java @@ -245,13 +245,13 @@ public class LeaseManager { return paths.remove(src); } - /** {@inheritDoc} */ + @Override public String toString() { return "[Lease. Holder: " + holder + ", pendingcreates: " + paths.size() + "]"; } - /** {@inheritDoc} */ + @Override public int compareTo(Lease o) { Lease l1 = this; Lease l2 = o; @@ -266,7 +266,7 @@ public class LeaseManager { } } - /** {@inheritDoc} */ + @Override public boolean equals(Object o) { if (!(o instanceof Lease)) { return false; @@ -279,7 +279,7 @@ public class LeaseManager { return false; } - /** {@inheritDoc} */ + @Override public int hashCode() { return holder.hashCode(); } @@ -429,7 +429,7 @@ public class LeaseManager { } } - /** {@inheritDoc} */ + @Override public synchronized String toString() { return getClass().getSimpleName() + "= {" + "\n leases=" + leases diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java index 96cc8982df2..0d74c8d54ad 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java @@ -647,7 +647,7 @@ public class NamenodeFsck { return (float) (totalReplicas) / (float) totalBlocks; } - /** {@inheritDoc} */ + @Override public String toString() { StringBuilder res = new StringBuilder(); res.append("Status: ").append((isHealthy() ? "HEALTHY" : "CORRUPT")) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java index 6c711b9d373..11f77cc08b0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java @@ -129,7 +129,7 @@ public class SecondaryNameNode implements Runnable { private FSNamesystem namesystem; - /** {@inheritDoc} */ + @Override public String toString() { return getClass().getSimpleName() + " Status" + "\nName Node Address : " + nameNodeAddr diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java index d042e156b23..9a7118444d6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SerialNumberManager.java @@ -64,7 +64,7 @@ class SerialNumberManager { return i2t.get(i); } - /** {@inheritDoc} */ + @Override public String toString() { return "max=" + max + ",\n t2i=" + t2i + ",\n i2t=" + i2t; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java index 048009e2abe..d21b92ed1b9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeRegistration.java @@ -113,7 +113,7 @@ implements Writable, NodeRegistration { ///////////////////////////////////////////////// // Writable ///////////////////////////////////////////////// - /** {@inheritDoc} */ + @Override public void write(DataOutput out) throws IOException { super.write(out); @@ -124,7 +124,7 @@ implements Writable, NodeRegistration { exportedKeys.write(out); } - /** {@inheritDoc} */ + @Override public void readFields(DataInput in) throws IOException { super.readFields(in); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocolR23Compatible/DatanodeRegistrationWritable.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocolR23Compatible/DatanodeRegistrationWritable.java index e2bc2d82a16..3dc13f417df 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocolR23Compatible/DatanodeRegistrationWritable.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocolR23Compatible/DatanodeRegistrationWritable.java @@ -74,7 +74,7 @@ public class DatanodeRegistrationWritable implements Writable { ///////////////////////////////////////////////// // Writable ///////////////////////////////////////////////// - /** {@inheritDoc} */ + @Override public void write(DataOutput out) throws IOException { datanodeId.write(out); @@ -85,7 +85,7 @@ public class DatanodeRegistrationWritable implements Writable { exportedKeys.write(out); } - /** {@inheritDoc} */ + @Override public void readFields(DataInput in) throws IOException { datanodeId.readFields(in);