HDFS-7741. Remove unnecessary synchronized in FSDataInputStream and HdfsDataInputStream. (yliu)

This commit is contained in:
yliu 2015-02-06 06:31:03 +08:00
parent 9d91069118
commit 7b10ef0c3b
3 changed files with 5 additions and 2 deletions

View File

@ -58,7 +58,7 @@ public class FSDataInputStream extends DataInputStream
* @param desired offset to seek to
*/
@Override
public synchronized void seek(long desired) throws IOException {
public void seek(long desired) throws IOException {
((Seekable)in).seek(desired);
}

View File

@ -851,6 +851,9 @@ Release 2.7.0 - UNRELEASED
HDFS-7698. Fix locking on HDFS read statistics and add a method for
clearing them. (Colin P. McCabe via yliu)
HDFS-7741. Remove unnecessary synchronized in FSDataInputStream and
HdfsDataInputStream. (yliu)
Release 2.6.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -83,7 +83,7 @@ public class HdfsDataInputStream extends FSDataInputStream {
/**
* Get the collection of blocks that has already been located.
*/
public synchronized List<LocatedBlock> getAllBlocks() throws IOException {
public List<LocatedBlock> getAllBlocks() throws IOException {
return getDFSInputStream().getAllBlocks();
}