You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Sergey Shelukhin (JIRA)" <ji...@apache.org> on 2013/03/27 21:21:16 UTC

[jira] [Commented] (HBASE-7970) Improve file descriptor usage: currently, there are two file descriptors per storefile

    [ https://issues.apache.org/jira/browse/HBASE-7970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615699#comment-13615699 ] 

Sergey Shelukhin commented on HBASE-7970:
-----------------------------------------

Logic in readBlockData in HFileBlock can use these interchangably...
>From other places two separate streams would be trivial to remove.
Given that we expect checksum failures to happen rarely, should we keep one of these in block reader, and open the other one on demand if we do get checksum failure?
                
> Improve file descriptor usage: currently, there are two file descriptors per storefile
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-7970
>                 URL: https://issues.apache.org/jira/browse/HBASE-7970
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Himanshu Vashishtha
>
> This is because there are two open calls in the HFile: one with checksum and another for without checksum support in v2:
> see the method in HFile:createReaderWithEncoding()
> {code}
> FSDataInputStream fsdis = fs.open(path);
> FSDataInputStream fsdisNoFsChecksum = fsdis;
> // If the fs is not an instance of HFileSystem, then create an
> // instance of HFileSystem that wraps over the specified fs.
> // In this case, we will not be able to avoid checksumming inside
> // the filesystem.
> if (!(fs instanceof HFileSystem)) {
>   hfs = new HFileSystem(fs);
> } else {
>   hfs = (HFileSystem)fs;
>   // open a stream to read data without checksum verification in
>   // the filesystem
>   fsdisNoFsChecksum = hfs.getNoChecksumFs().open(path);
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira