瀏覽代碼

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

John Zhuge 8 年之前
父節點
當前提交
5046a45507

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java

@@ -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);