You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "John Doe (JIRA)" <ji...@apache.org> on 2017/12/05 02:40:00 UTC

[jira] [Created] (HIVE-18219) When InputStream is corrupted, the skip() returns -1, causing infinite loop

John Doe created HIVE-18219:
-------------------------------

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


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
(v6.4.14#64029)