PositionCache decrements its position for reads at the end of file
------------------------------------------------------------------

         Key: HADOOP-42
         URL: http://issues.apache.org/jira/browse/HADOOP-42
     Project: Hadoop
        Type: Bug
  Components: fs  
    Reporter: Konstantin Shvachko
 Attachments: Position.patch

See

int org.apache.hadoop.fs.FSDataInputStream.PositionCache.read(byte[] b, int 
off, int len) 

if in.read() returns -1 (e.g. at the end of file) the position in the cache 
will be decremented, while it should be retained.

The attached patch would fix it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to