Kousuke Saruta created SPARK-2896:
-------------------------------------

             Summary: Remove redundant error notification by results.put() when 
fetching from remote
                 Key: SPARK-2896
                 URL: https://issues.apache.org/jira/browse/SPARK-2896
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
    Affects Versions: 1.0.1
            Reporter: Kousuke Saruta
            Priority: Minor


In BasicBlockFetcherIterator#sendRequest, there is a part of code as follows.

{code}
        case Failure(exception) => {
          logError("Could not get block(s) from " + cmId, exception)
          for ((blockId, size) <- req.blocks) {
            results.put(new FetchResult(blockId, -1, null))
          }
        }
{code}

This is a part of code for notifying error has occurred.
In this code, results.put is called for all of req.blocks but I think it's 
redundant; only first error is enough. 

It is because when .iterator.next() returns error result, then it throws 
FetchFailedException immediately.




--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to