vvysotskyi opened a new pull request #2186:
URL: https://github.com/apache/drill/pull/2186


   # [DRILL-7874](https://issues.apache.org/jira/browse/DRILL-7874): Ensure 
DrillFSDataInputStream.read populates byte array of the requested length
   
   ## Description
   
   Documentation for the `InputStream.read(byte b[], int off, int len)` method 
doesn't guarantee that all requested (if available) bytes will be stored in the 
byte array, so some implementations indeed populate byte array only with 
partial data.
   It causes issues for storage plugins that manipulate with byte arrays 
obtained from the stream by this way, for example, the PCAP plugin when files 
are stored at s3.
   
   This PR updates the `DrillFSDataInputStream.read` method to ensure that all 
requested bytes were stored in the byte array to have the same behavior 
regardless of the `InputStream` implementation.
   
   ## Documentation
   NA
   
   ## Testing
   Checked manually, no unit tests provided because currently it is reproduced 
with s3 only.
   


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

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


Reply via email to