HDFS-4999. Fix TestShortCircuitLocalRead on branch-2. Contributed by Colin Patrick McCabe.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1503898 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kihwal Lee 2013-07-16 21:31:21 +00:00
parent 4c45da1ab7
commit 1642f06cd8
2 changed files with 5 additions and 3 deletions

View File

@ -477,6 +477,8 @@ Release 2.1.0-beta - 2013-07-02
HDFS-4980. Incorrect logging.properties file for hadoop-httpfs.
(Mark Grover via suresh)
HDFS-4999. Fix TestShortCircuitLocalRead on branch-2. (cmccabe via kihwal)
BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.

View File

@ -34,8 +34,7 @@ import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DFSClient.DFSDataInputStream;
import org.apache.hadoop.hdfs.protocol.BlockLocalPathInfo;
import org.apache.hadoop.hdfs.client.HdfsDataInputStream;
import org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol;
import org.apache.hadoop.hdfs.protocol.DatanodeID;
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
@ -57,6 +56,7 @@ import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.*;
/**
@ -180,7 +180,7 @@ public class TestShortCircuitLocalRead {
assertTrue(fs.getClient().useLegacyBlockReaderLocal());
}
DFSDataInputStream stm = (DFSDataInputStream)fs.open(name);
HdfsDataInputStream stm = (HdfsDataInputStream)fs.open(name);
ByteBuffer actual = ByteBuffer.allocateDirect(expected.length - readOffset);