|
30 | 30 | import java.util.concurrent.TimeoutException; |
31 | 31 | import java.util.function.Supplier; |
32 | 32 |
|
| 33 | +import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IPC_CLIENT_CONNECT_MAX_RETRIES_KEY; |
| 34 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY; |
| 35 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT; |
| 36 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY; |
| 37 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_IMAGE_PARALLEL_LOAD_KEY; |
| 38 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY; |
| 39 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_BLOCK_PLACEMENT_EC_CLASSNAME_KEY; |
| 40 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_BLOCK_REPLICATOR_CLASSNAME_KEY; |
| 41 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_AVOID_SLOW_DATANODE_FOR_READ_KEY; |
| 42 | +import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_BLOCKPLACEMENTPOLICY_EXCLUDE_SLOW_NODES_ENABLED_KEY; |
| 43 | + |
33 | 44 | import org.apache.commons.io.FileUtils; |
34 | 45 | import org.apache.commons.text.TextStringBuilder; |
| 46 | +import org.apache.hadoop.fs.FsShell; |
| 47 | +import org.apache.hadoop.fs.permission.FsAction; |
| 48 | +import org.apache.hadoop.fs.permission.FsPermission; |
35 | 49 | import org.apache.hadoop.conf.Configuration; |
36 | 50 | import org.apache.hadoop.conf.ReconfigurationUtil; |
37 | 51 | import org.apache.hadoop.fs.ChecksumException; |
38 | 52 | import org.apache.hadoop.fs.FSDataOutputStream; |
39 | 53 | import org.apache.hadoop.fs.FileSystem; |
40 | | -import org.apache.hadoop.fs.FsShell; |
41 | 54 | import org.apache.hadoop.fs.Path; |
42 | | -import org.apache.hadoop.fs.permission.FsAction; |
43 | | -import org.apache.hadoop.fs.permission.FsPermission; |
44 | 55 | import org.apache.hadoop.hdfs.DFSClient; |
45 | 56 | import org.apache.hadoop.hdfs.DFSConfigKeys; |
46 | 57 | import org.apache.hadoop.hdfs.DFSTestUtil; |
|
71 | 82 | import org.apache.hadoop.test.PathUtils; |
72 | 83 | import org.apache.hadoop.util.Lists; |
73 | 84 | import org.apache.hadoop.util.ToolRunner; |
| 85 | + |
74 | 86 | import org.junit.After; |
75 | | -import org.junit.Assert; |
76 | 87 | import org.junit.Before; |
77 | 88 | import org.junit.Test; |
| 89 | +import org.junit.Assert; |
78 | 90 | import org.slf4j.Logger; |
79 | 91 | import org.slf4j.LoggerFactory; |
80 | 92 |
|
81 | | -import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IPC_CLIENT_CONNECT_MAX_RETRIES_KEY; |
82 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_BLOCK_PLACEMENT_EC_CLASSNAME_KEY; |
83 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_BLOCK_REPLICATOR_CLASSNAME_KEY; |
84 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY; |
85 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_DEFAULT; |
86 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY; |
87 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_IMAGE_PARALLEL_LOAD_KEY; |
88 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_AVOID_SLOW_DATANODE_FOR_READ_KEY; |
89 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_BLOCKPLACEMENTPOLICY_EXCLUDE_SLOW_NODES_ENABLED_KEY; |
90 | | -import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY; |
91 | 93 | import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_MAX_SLOWPEER_COLLECT_NODES_KEY; |
92 | 94 | import static org.apache.hadoop.hdfs.client.HdfsAdmin.TRASH_PERMISSION; |
93 | 95 | import static org.hamcrest.CoreMatchers.allOf; |
94 | 96 | import static org.hamcrest.CoreMatchers.anyOf; |
95 | | -import static org.hamcrest.CoreMatchers.containsString; |
96 | 97 | import static org.hamcrest.CoreMatchers.is; |
97 | 98 | import static org.hamcrest.CoreMatchers.not; |
98 | 99 | import static org.junit.Assert.assertEquals; |
|
101 | 102 | import static org.junit.Assert.assertThat; |
102 | 103 | import static org.junit.Assert.assertTrue; |
103 | 104 | import static org.junit.Assert.fail; |
| 105 | +import static org.hamcrest.CoreMatchers.containsString; |
104 | 106 | import static org.mockito.ArgumentMatchers.any; |
105 | 107 | import static org.mockito.Mockito.mock; |
106 | 108 | import static org.mockito.Mockito.when; |
|
0 commit comments