zhengchenyu commented on code in PR #1263:
URL:
https://github.com/apache/incubator-uniffle/pull/1263#discussion_r1374278798
##########
client-mr/core/src/test/java/org/apache/hadoop/mapreduce/task/reduce/RssRemoteMergeManagerTest.java:
##########
@@ -58,22 +63,37 @@ public class RssRemoteMergeManagerTest {
TaskAttemptID mapId2 = new TaskAttemptID(new TaskID(jobId, TaskType.MAP, 2),
0);
TaskAttemptID reduceId1 = new TaskAttemptID(new TaskID(jobId,
TaskType.REDUCE, 0), 0);
+ private static FileSystem remoteFS;
+ private static MiniDFSCluster cluster;
+
+ @BeforeAll
+ public static void setUpHdfs(@TempDir File tempDir) throws Exception {
+ Configuration conf = new Configuration();
+ File baseDir = tempDir;
+ conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, baseDir.getAbsolutePath());
+ cluster = (new MiniDFSCluster.Builder(conf)).build();
+ String hdfsUri = cluster.getURI().toString() + "/";
+ remoteFS = (new Path(hdfsUri)).getFileSystem(conf);
+ }
+
+ @AfterAll
+ public static void tearDownHdfs() throws Exception {
+ remoteFS.close();
+ cluster.shutdown();
+ }
+
@Test
- public void mergerTest(@TempDir File tmpDir) throws Throwable {
+ public void mergerTest() throws Throwable {
JobConf jobConf = new JobConf();
final FileSystem fs = FileSystem.getLocal(jobConf);
final LocalDirAllocator lda = new LocalDirAllocator(MRConfig.LOCAL_DIR);
- jobConf.set("mapreduce.reduce.memory.totalbytes", "1024");
- jobConf.set("mapreduce.reduce.shuffle.memory.limit.percent", "0.01");
- jobConf.set("mapreduce.reduce.shuffle.merge.percent", "0.1");
-
final RssRemoteMergeManagerImpl<Text, Text> mergeManager =
new RssRemoteMergeManagerImpl<Text, Text>(
appId,
reduceId1,
jobConf,
- tmpDir.toString(),
+ "/tmp",
Review Comment:
> Will this file be deleted?
@smallzhongfeng
This is a hdfs file. When virtual machine exits, all file used by mini
cluster will be removed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]