Skip to content

Commit 11df20a

Browse files
committed
--amend
1 parent 0d94ca6 commit 11df20a

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/DistributedShellBaseTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public abstract class DistributedShellBaseTest {
101101
"--appname",
102102
""
103103
};
104-
protected static MiniDFSCluster hdfsCluster = null;
104+
private static MiniDFSCluster hdfsCluster = null;
105105
private static MiniYARNCluster yarnCluster = null;
106106
private static String yarnSiteBackupPath = null;
107107
private static String yarnSitePath = null;
@@ -128,8 +128,10 @@ public static void setupUnitTests() throws Exception {
128128
// backup the original yarn-site file.
129129
yarnSitePath = url.getPath();
130130
yarnSiteBackupPath = url.getPath() + "-backup";
131-
Files.copy(Paths.get(yarnSitePath), Paths.get(yarnSiteBackupPath),
132-
StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING);
131+
Files.copy(Paths.get(yarnSitePath),
132+
Paths.get(yarnSiteBackupPath),
133+
StandardCopyOption.COPY_ATTRIBUTES,
134+
StandardCopyOption.REPLACE_EXISTING);
133135
}
134136

135137
@AfterClass
@@ -598,4 +600,8 @@ private void waitForNMsToRegister() throws Exception {
598600
return (rmContext.getRMNodes().size() >= NUM_NMS);
599601
}, 100, 60000);
600602
}
603+
604+
protected MiniDFSCluster getHDFSCluster() {
605+
return hdfsCluster;
606+
}
601607
}

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDSTimelineV15.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ protected void customizeConfiguration(
5151
YarnConfiguration config) throws Exception {
5252
setUpHDFSCluster();
5353
PluginStoreTestUtils.prepareFileSystemForPluginStore(
54-
hdfsCluster.getFileSystem());
55-
PluginStoreTestUtils.prepareConfiguration(config, hdfsCluster);
54+
getHDFSCluster().getFileSystem());
55+
PluginStoreTestUtils.prepareConfiguration(config, getHDFSCluster());
5656
config.set(YarnConfiguration.TIMELINE_SERVICE_ENTITY_GROUP_PLUGIN_CLASSES,
5757
DistributedShellTimelinePlugin.class.getName());
5858
}
@@ -75,7 +75,7 @@ protected void checkTimeline(ApplicationId appId,
7575
GenericTestUtils.waitFor(() -> {
7676
try {
7777
RemoteIterator<FileStatus> iterApps =
78-
hdfsCluster.getFileSystem().listStatusIterator(doneDir);
78+
getHDFSCluster().getFileSystem().listStatusIterator(doneDir);
7979
return (iterApps.hasNext());
8080
} catch (Exception e) {
8181
exceptionRef.set(e);

0 commit comments

Comments
 (0)