You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/10/25 23:46:50 UTC
[GitHub] [hadoop] xinglin commented on a diff in pull request #4835: HDFS-16740. Mini cluster test flakiness
xinglin commented on code in PR #4835:
URL: https://github.com/apache/hadoop/pull/4835#discussion_r1005061516
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommissionWithStriped.java:
##########
@@ -117,10 +121,8 @@ protected Configuration createConfiguration() {
public void setup() throws IOException {
conf = createConfiguration();
// Set up the hosts/exclude files.
- localFileSys = FileSystem.getLocal(conf);
- Path workingDir = localFileSys.getWorkingDirectory();
- decommissionDir = new Path(workingDir,
- PathUtils.getTestDirName(getClass()) + "/work-dir/decommission");
+ localFileSys = FileSystem.get(baseDir.getRoot().toURI(), conf);
Review Comment:
Will FileSystem.get() return a LocalFileSystem object here? what scheme does baseDir.getRoot().toURI() return?
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestRollingUpgrade.java:
##########
@@ -83,37 +83,18 @@ public static void runCmd(DFSAdmin dfsadmin, boolean success,
}
@Rule
- public TemporaryFolder folder = new TemporaryFolder();
-
- /**
- * Create a default HDFS configuration which has test-specific data directories. This is
- * intended to protect against interactions between test runs that might corrupt results. Each
- * test run's data is automatically cleaned-up by JUnit.
- *
- * @return a default configuration with test-specific data directories
- */
- public Configuration getHdfsConfiguration() throws IOException {
- Configuration conf = new HdfsConfiguration();
-
- // Override the file system locations with test-specific temporary folders
- conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY,
Review Comment:
Why is the case that we no longer need to set these properties anymore? Is it because now NAME_DIR/DATA_DIR/CHECKPOINT_DIR will all defaulted to be within the new baseDir?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org