ahmarsuhail opened a new pull request #3905:
URL: https://github.com/apache/hadoop/pull/3905


   ### Description of PR
   
   Jira: https://issues.apache.org/jira/browse/HADOOP-16155
   
   When an error happens on read, do not reopen the stream.
   
   For the unit tests I've changed the order of super.read() and trigger 
failure. This is because previously the failure would happen after the read 
actually executed and so the buffer would not be empty and we couldn't assert 
on the buffer being empty in case of failures.
   
   I've also added a new variable triggerGetObjectFailure. This will not 
trigger a get object failure in case of 
testInputStreamReadFullyRetryForException. This is because since we are 
removing retries from read(bytes[]), readFully() will call read(bytes[]) after 
each failure which will then call lazySeek() every time. The get object failure 
ends up being thrown in lazySeek() which does not retry and so readFully does 
not complete.
   
   ### How was this patch tested?
   
   Tested in eu-west-1 by running
   
   ```
   mvn -Dparallel-tests -DtestsThreadCount=16 clean verify
   ```
   
   
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to