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

Lynch Lee commented on HIVE-18219:
----------------------------------

[~dustinday] Which Class this function blongs to ??

> When InputStream is corrupted, the skip() returns -1, causing infinite loop
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-18219
>                 URL: https://issues.apache.org/jira/browse/HIVE-18219
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: John Doe
>            Priority: Major
>
> Similar like 
> [CASSANDRA-7330|https://issues.apache.org/jira/browse/CASSANDRA-7330], when 
> InputStream is corrupted, skip() returns -1, causing the following loop be 
> infinite.
> {code:java}
>   public final int skipBytes(int count) throws IOException {
>     int skipped = 0;
>     long skip;
>     while (skipped < count && (skip = in.skip(count - skipped)) != 0) {
>       skipped += skip;
>     }
>     if (skipped < 0) {
>       throw new EOFException();
>     }
>     return skipped;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to