AngersZhuuuu commented on a change in pull request #27419:
[SPARK-30694][SHUFFLE]If exception occured while fetching blocks by
ExternalBlockClient, fail early when External Shuffle Service is not alive
URL: https://github.com/apache/spark/pull/27419#discussion_r374103543
##########
File path:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalBlockStoreClient.java
##########
@@ -103,14 +103,22 @@ public void fetchBlocks(
try {
RetryingBlockFetcher.BlockFetchStarter blockFetchStarter =
(blockIds1, listener1) -> {
- // Unless this client is closed.
- if (clientFactory != null) {
- TransportClient client = clientFactory.createClient(host, port);
- new OneForOneBlockFetcher(client, appId, execId,
- blockIds1, listener1, conf, downloadFileManager).start();
- } else {
- logger.info("This clientFactory was closed. Skipping further
block fetch retries.");
- }
+ try{
+ // Unless this client is closed.
+ if (clientFactory != null) {
+ TransportClient client = clientFactory.createClient(host, port);
+ new OneForOneBlockFetcher(client, appId, execId,
+ blockIds1, listener1, conf, downloadFileManager).start();
+ } else {
+ logger.info("This clientFactory was closed. Skipping further
block fetch retries.");
+ }
+ } catch (IOException e) {
+ logger.info("The relative remote external shuffle service (host:
" + host + "," +
+ "port: "+ port + "), which maintains the block data can't
been connected.");
+ throw e;
Review comment:
cc @cloud-fan
I want to throw exception like
https://github.com/AngersZhuuuu/spark/blob/e2dbe4bca387542e2043abc0801190531e805684/core/src/main/scala/org/apache/spark/network/netty/NettyBlockTransferService.scala#L130
But this module don't dependency `spark-core`, Add deps and throw exception
like
```
/**
* Exception throw when can't connect to External Shuffle Service
*/
private[spark] case class ExternalShuffleServiceLostException(message:
String)
extends SparkException(message)
```
Is what I want to do.
And seem we don't have way to check external shuffle service is alive.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]