|
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 |
| - |
44 | 33 | import org.apache.commons.io.FileUtils;
|
45 | 34 | 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; |
49 | 35 | import org.apache.hadoop.conf.Configuration;
|
50 | 36 | import org.apache.hadoop.conf.ReconfigurationUtil;
|
51 | 37 | import org.apache.hadoop.fs.ChecksumException;
|
52 | 38 | import org.apache.hadoop.fs.FSDataOutputStream;
|
53 | 39 | import org.apache.hadoop.fs.FileSystem;
|
| 40 | +import org.apache.hadoop.fs.FsShell; |
54 | 41 | import org.apache.hadoop.fs.Path;
|
| 42 | +import org.apache.hadoop.fs.permission.FsAction; |
| 43 | +import org.apache.hadoop.fs.permission.FsPermission; |
55 | 44 | import org.apache.hadoop.hdfs.DFSClient;
|
56 | 45 | import org.apache.hadoop.hdfs.DFSConfigKeys;
|
57 | 46 | import org.apache.hadoop.hdfs.DFSTestUtil;
|
|
82 | 71 | import org.apache.hadoop.test.PathUtils;
|
83 | 72 | import org.apache.hadoop.util.Lists;
|
84 | 73 | import org.apache.hadoop.util.ToolRunner;
|
85 |
| - |
86 | 74 | import org.junit.After;
|
| 75 | +import org.junit.Assert; |
87 | 76 | import org.junit.Before;
|
88 | 77 | import org.junit.Test;
|
89 |
| -import org.junit.Assert; |
90 | 78 | import org.slf4j.Logger;
|
91 | 79 | import org.slf4j.LoggerFactory;
|
92 | 80 |
|
| 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; |
93 | 91 | import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_MAX_SLOWPEER_COLLECT_NODES_KEY;
|
94 | 92 | import static org.apache.hadoop.hdfs.client.HdfsAdmin.TRASH_PERMISSION;
|
95 | 93 | import static org.hamcrest.CoreMatchers.allOf;
|
96 | 94 | import static org.hamcrest.CoreMatchers.anyOf;
|
| 95 | +import static org.hamcrest.CoreMatchers.containsString; |
97 | 96 | import static org.hamcrest.CoreMatchers.is;
|
98 | 97 | import static org.hamcrest.CoreMatchers.not;
|
99 | 98 | import static org.junit.Assert.assertEquals;
|
|
102 | 101 | import static org.junit.Assert.assertThat;
|
103 | 102 | import static org.junit.Assert.assertTrue;
|
104 | 103 | import static org.junit.Assert.fail;
|
105 |
| -import static org.hamcrest.CoreMatchers.containsString; |
106 | 104 | import static org.mockito.ArgumentMatchers.any;
|
107 | 105 | import static org.mockito.Mockito.mock;
|
108 | 106 | import static org.mockito.Mockito.when;
|
@@ -338,7 +336,7 @@ public void testDataNodeGetReconfigurableProperties() throws IOException {
|
338 | 336 | final List<String> outs = Lists.newArrayList();
|
339 | 337 | final List<String> errs = Lists.newArrayList();
|
340 | 338 | getReconfigurableProperties("datanode", address, outs, errs);
|
341 |
| - assertEquals(16, outs.size()); |
| 339 | + assertEquals(17, outs.size()); |
342 | 340 | assertEquals(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY, outs.get(1));
|
343 | 341 | }
|
344 | 342 |
|
|
0 commit comments