HDFS-11685. TestDistributedFileSystem.java fails to compile. Contributed by John Zhuge.

This commit is contained in:
John Zhuge 2017-04-19 19:20:43 -07:00
parent efb790b0d6
commit 5046a45507
1 changed files with 2 additions and 2 deletions

View File

@ -1241,7 +1241,7 @@ public class TestDistributedFileSystem {
return null;
}
}).when(injector).getHdfsBlocksMetadata();
DataNodeFaultInjector.instance = injector;
DataNodeFaultInjector.set(injector);
BlockStorageLocation[] locs = fs.getFileBlockStorageLocations(allLocs);
for (BlockStorageLocation loc: locs) {
@ -1251,7 +1251,7 @@ public class TestDistributedFileSystem {
}
// Restore a default injector
DataNodeFaultInjector.instance = new DataNodeFaultInjector();
DataNodeFaultInjector.set(new DataNodeFaultInjector());
// Stop a datanode to simulate a failure.
DataNodeProperties stoppedNode = cluster.stopDataNode(0);