Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/18565#discussion_r126285935
--- Diff:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleClient.java
---
@@ -91,15 +95,18 @@ public void fetchBlocks(
String execId,
String[] blockIds,
BlockFetchingListener listener,
- File[] shuffleFiles) {
+ boolean toDisk,
+ TmpFileCreater tmpFileCreater) {
checkInit();
logger.debug("External shuffle fetch from {}:{} (executor id {})",
host, port, execId);
try {
RetryingBlockFetcher.BlockFetchStarter blockFetchStarter =
(blockIds1, listener1) -> {
TransportClient client = clientFactory.createClient(host,
port);
- new OneForOneBlockFetcher(client, appId, execId, blockIds1,
listener1, conf,
- shuffleFiles).start();
+ OneForOneBlockFetcher blockFetcher = new
OneForOneBlockFetcher(client, appId, execId,
+ blockIds1, listener1, conf, toDisk, tmpFileCreater);
+ blockfetchers.add(blockFetcher);
--- End diff --
`OneForOneBlockFetcher` doesn't implement `equals` and `hashCode`, so 2
`OneForOneBlockFetcher`s are considered equal if and only if they are same
instance.
Here `blockfetchers.add(blockFetcher)` always add a new instance, so I
don't thing using set to store block fetchers makes sense.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]