Github user GraceH commented on a diff in the pull request:
https://github.com/apache/spark/pull/7927#discussion_r36271550
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -592,8 +592,14 @@ private[spark] class BlockManager(
val locations = Random.shuffle(master.getLocations(blockId))
for (loc <- locations) {
logDebug(s"Getting remote block $blockId from $loc")
- val data = blockTransferService.fetchBlockSync(
- loc.host, loc.port, loc.executorId,
blockId.toString).nioByteBuffer()
+ val data = try {
+ blockTransferService.fetchBlockSync(
+ loc.host, loc.port, loc.executorId,
blockId.toString).nioByteBuffer()
+ } catch {
+ case e: Throwable =>
+ logWarning(s"Exception during getting remote block $blockId from
$loc", e)
--- End diff --
@squito So agree to do like ```askWithRetry```. If we can get one block
from any remote store successfully, it successes. We should not break the
working path whenever meet the first exception.
So maybe, we need to catch all kinds of Exceptions (not IOException only).
If some attempts failed, we need to log out the exception information but
continue the fetching work. When we run to the final location and it still
throws out certain exception, we need to throw out a NEW exception to tell that
all attempts failed (i.e., no available location there). and meanwhile, maybe
to add the last exception information into this NEW exception.
But if we only focus IOException, when we meet some types of exceptions for
certain locations, it still breaks the entire workflow (to fetch data from the
rest locations if possible).
What do you think?
---
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]