HDFS-16110. Remove unused method reportChecksumFailure in DFSClient (#3174)

Reviewed-by: Takanobu Asanuma <tasanuma@apache.org>
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
litao 2021-07-06 10:31:22 +08:00 committed by GitHub
parent a5db6831bc
commit a447cfd78b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 19 deletions

View File

@ -501,8 +501,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
} }
/** Get a lease and start automatic renewal */ /** Get a lease and start automatic renewal */
private void beginFileLease(final long inodeId, final DFSOutputStream out) private void beginFileLease(final long inodeId, final DFSOutputStream out) {
throws IOException {
synchronized (filesBeingWritten) { synchronized (filesBeingWritten) {
putFileBeingWritten(inodeId, out); putFileBeingWritten(inodeId, out);
LeaseRenewer renewer = getLeaseRenewer(); 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 /** Put a file. Only called from LeaseRenewer, where proper locking is
* enforced to consistently update its local dfsclients array and * enforced to consistently update its local dfsclients array and
* client's filesBeingWritten map. * client's filesBeingWritten map.
@ -853,7 +851,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
public boolean isManaged(Token<?> token) throws IOException { public boolean isManaged(Token<?> token) throws IOException {
return true; return true;
} }
} }
/** /**
@ -886,7 +883,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
return getLocatedBlocks(src, start, dfsClientConf.getPrefetchSize()); return getLocatedBlocks(src, start, dfsClientConf.getPrefetchSize());
} }
/* /**
* This is just a wrapper around callGetBlockLocations, but non-static so that * This is just a wrapper around callGetBlockLocations, but non-static so that
* we can stub it out for tests. * we can stub it out for tests.
*/ */
@ -1039,7 +1036,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
return open(src, buffersize, verifyChecksum); return open(src, buffersize, verifyChecksum);
} }
/** /**
* Create an input stream that obtains a nodelist from the * Create an input stream that obtains a nodelist from the
* namenode, and then reads from all the right places. Creates * 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); progress, buffersize, checksumOpt, favoredNodes, null);
} }
/** /**
* Same as {@link #create(String, FsPermission, EnumSet, boolean, short, long, * Same as {@link #create(String, FsPermission, EnumSet, boolean, short, long,
* Progressable, int, ChecksumOpt, InetSocketAddress[])} with the addition of * Progressable, int, ChecksumOpt, InetSocketAddress[])} with the addition of
@ -1606,6 +1601,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
SnapshotAccessControlException.class); SnapshotAccessControlException.class);
} }
} }
/** /**
* Rename file or directory. * Rename file or directory.
* @see ClientProtocol#rename2(String, String, Options.Rename...) * @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 { public boolean exists(String src) throws IOException {
checkOpen(); checkOpen();
@ -1776,6 +1773,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
UnresolvedPathException.class); UnresolvedPathException.class);
} }
} }
/** /**
* Close status of a file * Close status of a file
* @return true if file is already closed * @return true if file is already closed
@ -2235,7 +2233,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
} }
} }
/** /**
* Allow snapshot on a directory. * Allow snapshot on a directory.
* *
@ -2283,6 +2280,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
throw re.unwrapRemoteException(); throw re.unwrapRemoteException();
} }
} }
/** /**
* Get the difference between two snapshots of a directory iteratively. * Get the difference between two snapshots of a directory iteratively.
* @see ClientProtocol#getSnapshotDiffReportListing * @see ClientProtocol#getSnapshotDiffReportListing
@ -2483,8 +2481,6 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
} }
} }
/**
*/
@Deprecated @Deprecated
public boolean mkdirs(String src) throws IOException { public boolean mkdirs(String src) throws IOException {
return mkdirs(src, null, true); return mkdirs(src, null, true);
@ -2650,8 +2646,9 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
SnapshotAccessControlException.class); 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) * @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. // just reports checksum failure and ignores any exception during the report.
void reportChecksumFailure(String file, LocatedBlock lblocks[]) { void reportChecksumFailure(String file, LocatedBlock lblocks[]) {
try { try {