Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/5116#issuecomment-97183839
  
    > I think catching SubmitRestConnectionException in 
createSubmission/requestSubmissionStatus/killSubmission is more reasonable than 
in readResponse as we use requestSubmissionStatus to Read the response from the 
server and return it as a validated and we submit requests to multiple masters 
in createSubmission/requestSubmissionStatus/killSubmission so we should take 
the response there either.
    
    If you look into the these methods you'll notice that the only place where 
it actually makes a connection to the master is in `post` or `postJson`, and 
both of these methods call `readResponse`. The current scope of catching these 
exceptions is too wide (we will never throw this exception outside of 
`readResponse`), and the cost we pay is duplicate code.


---
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]

Reply via email to