[ 
https://issues.apache.org/jira/browse/HADOOP-18107?focusedWorklogId=771565&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-771565
 ]

ASF GitHub Bot logged work on HADOOP-18107:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/May/22 20:27
            Start Date: 17/May/22 20:27
    Worklog Time Spent: 10m 
      Work Description: mukund-thakur commented on code in PR #4273:
URL: https://github.com/apache/hadoop/pull/4273#discussion_r875234271


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/ContractTestUtils.java:
##########
@@ -1095,6 +1102,54 @@ public static void validateFileContent(byte[] concat, 
byte[][] bytes) {
                 mismatch);
   }
 
+  /**
+   * Utility to validate vectored read results.
+   * @param fileRanges input ranges.
+   * @param originalData original data.
+   * @throws IOException any ioe.
+   */
+  public static void validateVectoredReadResult(List<FileRange> fileRanges,
+                                                byte[] originalData)
+          throws IOException, TimeoutException {
+    CompletableFuture<?>[] completableFutures = new 
CompletableFuture<?>[fileRanges.size()];
+    int i = 0;
+    for (FileRange res : fileRanges) {
+      completableFutures[i++] = res.getData();
+    }
+    CompletableFuture<Void> combinedFuture = 
CompletableFuture.allOf(completableFutures);
+    FutureIO.awaitFuture(combinedFuture, 5, TimeUnit.MINUTES);

Review Comment:
   I hope you don't want me to make this configurable as it is just used at 
here. Just adding a new constant in the current class?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 771565)
    Time Spent: 2h 10m  (was: 2h)

> Vectored IO support for large S3 files. 
> ----------------------------------------
>
>                 Key: HADOOP-18107
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18107
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>            Reporter: Mukund Thakur
>            Assignee: Mukund Thakur
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> This effort would mostly be adding more tests for large files under scale 
> tests and see if any new issue surfaces. 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to