소스 검색

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

John Zhuge 8 년 전
부모
커밋
5046a45507
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java

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