HDFS-14144. TestPred fails in Trunk. Contributed by Ayush Saxena.
This commit is contained in:
parent
76efeacd5f
commit
561b61cfb1
@ -676,11 +676,10 @@ private void doPreadTestWithChangedLocations(int maxFailures)
|
|||||||
Path p = new Path("/test");
|
Path p = new Path("/test");
|
||||||
String data = "testingmissingblock";
|
String data = "testingmissingblock";
|
||||||
DFSTestUtil.writeFile(dfs, p, data);
|
DFSTestUtil.writeFile(dfs, p, data);
|
||||||
|
DFSTestUtil.waitForReplication(dfs, p, (short) 2, 10000);
|
||||||
FSDataInputStream in = dfs.open(p);
|
FSDataInputStream in = dfs.open(p);
|
||||||
List<LocatedBlock> blocks = DFSTestUtil.getAllBlocks(in);
|
List<LocatedBlock> blocks = DFSTestUtil.getAllBlocks(in);
|
||||||
LocatedBlock lb = blocks.get(0);
|
LocatedBlock lb = blocks.get(0);
|
||||||
DFSTestUtil.waitForReplication(cluster, lb.getBlock(), 1, 2, 0);
|
|
||||||
blocks = DFSTestUtil.getAllBlocks(in);
|
blocks = DFSTestUtil.getAllBlocks(in);
|
||||||
DatanodeInfo[] locations = null;
|
DatanodeInfo[] locations = null;
|
||||||
for (LocatedBlock locatedBlock : blocks) {
|
for (LocatedBlock locatedBlock : blocks) {
|
||||||
|
Loading…
Reference in New Issue
Block a user