omalley commented on a change in pull request #1830: HADOOP-11867: Add gather 
API to file system.
URL: https://github.com/apache/hadoop/pull/1830#discussion_r374939040
 
 

 ##########
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PositionedReadable.java
 ##########
 @@ -85,4 +89,37 @@ void readFully(long position, byte[] buffer, int offset, 
int length)
    * the read operation completed
    */
   void readFully(long position, byte[] buffer) throws IOException;
+
+  /**
+   * What is the smallest reasonable seek?
+   * @return the minimum number of bytes
+   */
+  default int minimumReasonableSeek() {
+    return 4 * 1024;
 
 Review comment:
   Ok, although the difference between having the constant in the method versus 
defined and used once is pretty minor.
   Those constants should be determined by testing on each of the different 
file systems. I suspect the minimum seek on local fs < hdfs < s3.

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


With regards,
Apache Git Services

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

Reply via email to