[
https://issues.apache.org/jira/browse/HADOOP-17527?focusedWorklogId=556400&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-556400
]
ASF GitHub Bot logged work on HADOOP-17527:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 23/Feb/21 15:31
Start Date: 23/Feb/21 15:31
Worklog Time Spent: 10m
Work Description: vinaysbadami commented on a change in pull request
#2698:
URL: https://github.com/apache/hadoop/pull/2698#discussion_r580787165
##########
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:
why +1 ?
##########
File path:
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemRandomRead.java
##########
@@ -405,6 +418,27 @@ public void testSkipAndAvailableAndPosition() throws
Exception {
}
}
+ @Test
+ public void testZeroByteFile() throws Exception {
+ Path emptyFile = new Path("/emptyFile");
+ getFileSystem().create(emptyFile);
+ FSDataInputStream in = getFileSystem().open(emptyFile);
+ assertEquals("Initial position of inputstream in empty file is 0", 0,
+ in.getPos());
+ in.seek(0);
+ assertEquals("Seek to 0 should succeed", 0, in.getPos());
+ in.skip(0);
Review comment:
skip returns a long ==> u should assert it is the correct value
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 556400)
Time Spent: 3h 10m (was: 3h)
> ABFS: Fix boundary conditions in InputStream seek and skip
> ----------------------------------------------------------
>
> Key: HADOOP-17527
> URL: https://issues.apache.org/jira/browse/HADOOP-17527
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.3.0
> Reporter: Sumangala Patki
> Priority: Major
> Labels: pull-request-available
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> Modify AbfsInputStream seek method to throw EOF exception on seek to
> contentLength for a non-empty file. With this change, it will no longer be
> possible for the inputstream position (as obtained by getPos() API) to be
> moved to contentlength manually, except post reading the last byte.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]