Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.spark.shuffle.sort.io;

import java.util.Collections;
import java.util.Map;
import java.util.Optional;

Expand Down Expand Up @@ -57,7 +58,9 @@ public void initializeExecutor(String appId, String execId, Map<String, String>
throw new IllegalStateException("No blockManager available from the SparkEnv.");
}
blockResolver =
new IndexShuffleBlockResolver(sparkConf, blockManager, Map.of() /* Shouldn't be accessed */);
new IndexShuffleBlockResolver(
sparkConf, blockManager, Collections.emptyMap() /* Shouldn't be accessed */
);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import java.io._
import java.nio.ByteBuffer
import java.nio.channels.Channels
import java.nio.file.Files
import java.util.{Map => JMap}
import java.util.{Collections, Map => JMap}

import scala.collection.mutable.ArrayBuffer

Expand Down Expand Up @@ -58,7 +58,7 @@ private[spark] class IndexShuffleBlockResolver(
conf: SparkConf,
// var for testing
var _blockManager: BlockManager = null,
val taskIdMapsForShuffle: JMap[Int, OpenHashSet[Long]] = JMap.of())
val taskIdMapsForShuffle: JMap[Int, OpenHashSet[Long]] = Collections.emptyMap())
extends ShuffleBlockResolver
with Logging with MigratableResolver {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public void writeWithoutSpilling() throws Exception {
@Test
public void writeChecksumFileWithoutSpill() throws Exception {
IndexShuffleBlockResolver blockResolver =
new IndexShuffleBlockResolver(conf, blockManager, Map.of());
new IndexShuffleBlockResolver(conf, blockManager, Collections.emptyMap());
ShuffleChecksumBlockId checksumBlockId =
new ShuffleChecksumBlockId(0, 0, IndexShuffleBlockResolver.NOOP_REDUCE_ID());
String checksumAlgorithm = conf.get(package$.MODULE$.SHUFFLE_CHECKSUM_ALGORITHM());
Expand Down Expand Up @@ -346,7 +346,7 @@ public void writeChecksumFileWithoutSpill() throws Exception {
@Test
public void writeChecksumFileWithSpill() throws Exception {
IndexShuffleBlockResolver blockResolver =
new IndexShuffleBlockResolver(conf, blockManager, Map.of());
new IndexShuffleBlockResolver(conf, blockManager, Collections.emptyMap());
ShuffleChecksumBlockId checksumBlockId =
new ShuffleChecksumBlockId(0, 0, IndexShuffleBlockResolver.NOOP_REDUCE_ID());
String checksumAlgorithm = conf.get(package$.MODULE$.SHUFFLE_CHECKSUM_ALGORITHM());
Expand Down