You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2021/07/06 02:31:45 UTC

[hadoop] branch trunk updated: HDFS-16110. Remove unused method reportChecksumFailure in DFSClient (#3174)

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a447cfd  HDFS-16110. Remove unused method reportChecksumFailure in DFSClient (#3174)
a447cfd is described below

commit a447cfd78b5c6aed09090b8e115594587f3465be
Author: litao <to...@gmail.com>
AuthorDate: Tue Jul 6 10:31:22 2021 +0800

    HDFS-16110. Remove unused method reportChecksumFailure in DFSClient (#3174)
    
    Reviewed-by: Takanobu Asanuma <ta...@apache.org>
    Signed-off-by: Wei-Chiu Chuang <we...@apache.org>
---
 .../java/org/apache/hadoop/hdfs/DFSClient.java     | 29 ++++++++--------------
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
index 56adc5c..5890684 100755
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
@@ -501,8 +501,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
   }
 
   /** Get a lease and start automatic renewal */
-  private void beginFileLease(final long inodeId, final DFSOutputStream out)
-      throws IOException {
+  private void beginFileLease(final long inodeId, final DFSOutputStream out) {
     synchronized (filesBeingWritten) {
       putFileBeingWritten(inodeId, out);
       LeaseRenewer renewer = getLeaseRenewer();
@@ -528,7 +527,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     }
   }
 
-
   /** Put a file. Only called from LeaseRenewer, where proper locking is
    *  enforced to consistently update its local dfsclients array and
    *  client's filesBeingWritten map.
@@ -853,7 +851,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     public boolean isManaged(Token<?> token) throws IOException {
       return true;
     }
-
   }
 
   /**
@@ -886,7 +883,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     return getLocatedBlocks(src, start, dfsClientConf.getPrefetchSize());
   }
 
-  /*
+  /**
    * This is just a wrapper around callGetBlockLocations, but non-static so that
    * we can stub it out for tests.
    */
@@ -1039,7 +1036,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     return open(src, buffersize, verifyChecksum);
   }
 
-
   /**
    * Create an input stream that obtains a nodelist from the
    * namenode, and then reads from all the right places.  Creates
@@ -1241,7 +1237,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
         progress, buffersize, checksumOpt, favoredNodes, null);
   }
 
-
   /**
    * Same as {@link #create(String, FsPermission, EnumSet, boolean, short, long,
    * Progressable, int, ChecksumOpt, InetSocketAddress[])} with the addition of
@@ -1606,6 +1601,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
           SnapshotAccessControlException.class);
     }
   }
+
   /**
    * Rename file or directory.
    * @see ClientProtocol#rename2(String, String, Options.Rename...)
@@ -1678,7 +1674,8 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     }
   }
 
-  /** Implemented using getFileInfo(src)
+  /**
+   * Implemented using getFileInfo(src)
    */
   public boolean exists(String src) throws IOException {
     checkOpen();
@@ -1752,7 +1749,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     }
   }
 
- /**
+  /**
    * Get the file info for a specific file or directory.
    * @param src The string representation of the path to the file
    * @param needBlockToken Include block tokens in {@link LocatedBlocks}.
@@ -1776,6 +1773,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
           UnresolvedPathException.class);
     }
   }
+
   /**
    * Close status of a file
    * @return true if file is already closed
@@ -2235,7 +2233,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     }
   }
 
-
   /**
    * Allow snapshot on a directory.
    *
@@ -2283,6 +2280,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
       throw re.unwrapRemoteException();
     }
   }
+
   /**
    * Get the difference between two snapshots of a directory iteratively.
    * @see ClientProtocol#getSnapshotDiffReportListing
@@ -2483,8 +2481,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     }
   }
 
-  /**
-   */
   @Deprecated
   public boolean mkdirs(String src) throws IOException {
     return mkdirs(src, null, true);
@@ -2650,8 +2646,9 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
           SnapshotAccessControlException.class);
     }
   }
+
   /**
-   * set the modification and access time of a file
+   * set the modification and access time of a file.
    *
    * @see ClientProtocol#setTimes(String, long, long)
    */
@@ -2678,12 +2675,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     }
   }
 
-  void reportChecksumFailure(String file, ExtendedBlock blk, DatanodeInfo dn) {
-    DatanodeInfo [] dnArr = { dn };
-    LocatedBlock [] lblocks = { new LocatedBlock(blk, dnArr) };
-    reportChecksumFailure(file, lblocks);
-  }
-
   // just reports checksum failure and ignores any exception during the report.
   void reportChecksumFailure(String file, LocatedBlock lblocks[]) {
     try {

---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org