Skip to content

Commit 6e8448f

Browse files
committed
1 parent bbac204 commit 6e8448f

File tree

1 file changed

+16
-18
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools

1 file changed

+16
-18
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,17 @@
3030
import java.util.concurrent.TimeoutException;
3131
import java.util.function.Supplier;
3232

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-
4433
import org.apache.commons.io.FileUtils;
4534
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;
4935
import org.apache.hadoop.conf.Configuration;
5036
import org.apache.hadoop.conf.ReconfigurationUtil;
5137
import org.apache.hadoop.fs.ChecksumException;
5238
import org.apache.hadoop.fs.FSDataOutputStream;
5339
import org.apache.hadoop.fs.FileSystem;
40+
import org.apache.hadoop.fs.FsShell;
5441
import org.apache.hadoop.fs.Path;
42+
import org.apache.hadoop.fs.permission.FsAction;
43+
import org.apache.hadoop.fs.permission.FsPermission;
5544
import org.apache.hadoop.hdfs.DFSClient;
5645
import org.apache.hadoop.hdfs.DFSConfigKeys;
5746
import org.apache.hadoop.hdfs.DFSTestUtil;
@@ -82,18 +71,28 @@
8271
import org.apache.hadoop.test.PathUtils;
8372
import org.apache.hadoop.util.Lists;
8473
import org.apache.hadoop.util.ToolRunner;
85-
8674
import org.junit.After;
75+
import org.junit.Assert;
8776
import org.junit.Before;
8877
import org.junit.Test;
89-
import org.junit.Assert;
9078
import org.slf4j.Logger;
9179
import org.slf4j.LoggerFactory;
9280

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;
9391
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_MAX_SLOWPEER_COLLECT_NODES_KEY;
9492
import static org.apache.hadoop.hdfs.client.HdfsAdmin.TRASH_PERMISSION;
9593
import static org.hamcrest.CoreMatchers.allOf;
9694
import static org.hamcrest.CoreMatchers.anyOf;
95+
import static org.hamcrest.CoreMatchers.containsString;
9796
import static org.hamcrest.CoreMatchers.is;
9897
import static org.hamcrest.CoreMatchers.not;
9998
import static org.junit.Assert.assertEquals;
@@ -102,7 +101,6 @@
102101
import static org.junit.Assert.assertThat;
103102
import static org.junit.Assert.assertTrue;
104103
import static org.junit.Assert.fail;
105-
import static org.hamcrest.CoreMatchers.containsString;
106104
import static org.mockito.ArgumentMatchers.any;
107105
import static org.mockito.Mockito.mock;
108106
import static org.mockito.Mockito.when;
@@ -338,7 +336,7 @@ public void testDataNodeGetReconfigurableProperties() throws IOException {
338336
final List<String> outs = Lists.newArrayList();
339337
final List<String> errs = Lists.newArrayList();
340338
getReconfigurableProperties("datanode", address, outs, errs);
341-
assertEquals(16, outs.size());
339+
assertEquals(17, outs.size());
342340
assertEquals(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY, outs.get(1));
343341
}
344342

0 commit comments

Comments
 (0)