Skip to content
Closed
Changes from 1 commit
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 @@ -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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we only add try-catch to wrap this line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we only add try-catch to wrap this line?

It's OK to only wrap this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we only add try-catch to wrap this line?

Updated, hope for review current change

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.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what you do is just printing a log when error happens?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what you do is just printing a log when error happens?

Sorry, I miss the way to stop retry.

May be we should add some way to check external shuffle service alive?

throw e;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

} catch (Exception e) {
throw e;
}
};

int maxRetries = conf.maxIORetries();
Expand Down