sumangala-patki commented on a change in pull request #2698:
URL: https://github.com/apache/hadoop/pull/2698#discussion_r581199945



##########
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsInputStreamStatistics.java
##########
@@ -100,28 +100,31 @@ public void testSeekStatistics() throws IOException {
     AbfsOutputStream out = null;
     AbfsInputStream in = null;
 
+    int readBufferSize = getConfiguration().getReadBufferSize();
+    byte[] buf = new byte[readBufferSize + 1];

Review comment:
       To allow seek to position readBufferSize
   Example: readBufferSize = 4, then buf size = 5 => 5 bytes are written to 
file and valid indices in file are [0 1 2 3 4]
   Read call will read readBufferSize bytes, i.e., 4 bytes (up to and incl 
position 3 in file) so fcursor is now at position 4.
   To be counted as a forward seek, any subsequent seek has to be to a position 
>= current fcursor (4). Hence, the file should have at least 4 + 1 = 5 bytes 
for seek(4) to be allowed




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to