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/05/07 00:52:15 UTC

[jira] [Resolved] (HBASE-8499) Cell BaseDecoder may be using inputstream incorrectly

     [ https://issues.apache.org/jira/browse/HBASE-8499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Shelukhin resolved HBASE-8499.
-------------------------------------

    Resolution: Invalid

Nevermind, looks like 0 value is special.
                
> Cell BaseDecoder may be using inputstream incorrectly
> -----------------------------------------------------
>
>                 Key: HBASE-8499
>                 URL: https://issues.apache.org/jira/browse/HBASE-8499
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Priority: Minor
>
> {code}
>     if (this.in.available() <= 0) {
>       this.hasNext = false;
>       return this.hasNext;
>     }
> {code}
> Javadoc for available:
> {quote}
> Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. The next invocation might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes.
> Note that while some implementations of InputStream will return the total number of bytes in the stream, many will not.
> {quote}
> Not a big deal if we always use it with correct streams now, but rather dangerous.

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