[ 
https://issues.apache.org/jira/browse/HADOOP-18378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17613440#comment-17613440
 ] 

ASF GitHub Bot commented on HADOOP-18378:
-----------------------------------------

steveloughran commented on code in PR #4955:
URL: https://github.com/apache/hadoop/pull/4955#discussion_r988890027


##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/prefetch/TestS3ARemoteInputStream.java:
##########
@@ -288,4 +290,11 @@ private void testCloseHelper(S3ARemoteInputStream 
inputStream, int bufferSize)
     // Verify a second close() does not throw.
     inputStream.close();
   }
+
+  private static void assertAvailable(int expected, InputStream inputStream)
+      throws IOException {
+    assertThat(inputStream.available())
+        .describedAs("Check available bytes")

Review Comment:
   `S3AInputStream.toString()`:
   
   ```
   String s = streamStatistics.toString();
   ```
   
   the cloudstore bandwidth command does the toString calls if you ask for a 
-verbose run, which lets it print stats while still compiling against older 
releases
   





> Implement readFully(long position, byte[] buffer, int offset, int length)
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-18378
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18378
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.4.0
>            Reporter: Ahmar Suhail
>            Assignee: Alessandro Passaro
>            Priority: Minor
>              Labels: pull-request-available
>
> Implement readFully(long position, byte[] buffer, int offset, int length) in 
> PrefetchingInputStream, as it currently uses FSInputStream's 
> [readFully|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSInputStream.java#L136]
>  which calls read(long position, byte[] buffer, int offset, int length).
> This read then seeks to the position (which is ok), but then seeks back to 
> the original starting position at the end (so always seeking back to 0). this 
> is pretty bad for the prefetching implementation as it means lots of caching 
> to disk and getting blocks from disk. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to