[jira] [Commented] (HIVE-19393) NonSyncDataInputBuffer.skipBytes hangs when the file is corrupted
[ https://issues.apache.org/jira/browse/HIVE-19393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463011#comment-16463011 ] John Doe commented on HIVE-19393: - [~sershe] Actually it is a duplicated issue. SameĀ as [HIVE-18219|https://issues.apache.org/jira/browse/HIVE-18219] > NonSyncDataInputBuffer.skipBytes hangs when the file is corrupted > -- > > Key: HIVE-19393 > URL: https://issues.apache.org/jira/browse/HIVE-19393 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 1.0.0 >Reporter: John Doe >Priority: Minor > > When an InputStream is corrupted, the InputStream.skip can return -1, causing > the while loop in NonSyncDataInputBuffer.skipBytes become 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} > Similar bugs are Hadoop-8614, Yarn-2905, Yarn-163, Mapreduce-6990 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-19393) NonSyncDataInputBuffer.skipBytes hangs when the file is corrupted
[ https://issues.apache.org/jira/browse/HIVE-19393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462983#comment-16462983 ] John Doe commented on HIVE-19393: - [~sershe] Yes, you are right. Sorry about it. > NonSyncDataInputBuffer.skipBytes hangs when the file is corrupted > -- > > Key: HIVE-19393 > URL: https://issues.apache.org/jira/browse/HIVE-19393 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 1.0.0 >Reporter: John Doe >Priority: Minor > > When an InputStream is corrupted, the InputStream.skip can return 0, causing > the while loop in NonSyncDataInputBuffer.skipBytes become 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} > Similar bugs are > [Hadoop-8614|https://issues.apache.org/jira/browse/HADOOP-8614], > [Yarn-2905|https://issues.apache.org/jira/browse/YARN-2905], > [Yarn-163|https://issues.apache.org/jira/browse/YARN-163], > [Mapreduce-6990|https://issues.apache.org/jira/browse/MAPREDUCE-6990] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HIVE-19393) NonSyncDataInputBuffer.skipBytes hangs when the file is corrupted
[ https://issues.apache.org/jira/browse/HIVE-19393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462977#comment-16462977 ] Sergey Shelukhin commented on HIVE-19393: - Shouldn't "(skip = in.skip(count - skipped)) != 0" prevent it? > NonSyncDataInputBuffer.skipBytes hangs when the file is corrupted > -- > > Key: HIVE-19393 > URL: https://issues.apache.org/jira/browse/HIVE-19393 > Project: Hive > Issue Type: Bug > Components: SQL >Affects Versions: 1.0.0 >Reporter: John Doe >Priority: Minor > > When an InputStream is corrupted, the InputStream.skip can return 0, causing > the while loop in NonSyncDataInputBuffer.skipBytes become 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} > Similar bugs are > [Hadoop-8614|https://issues.apache.org/jira/browse/HADOOP-8614], > [Yarn-2905|https://issues.apache.org/jira/browse/YARN-2905], > [Yarn-163|https://issues.apache.org/jira/browse/YARN-163], > [Mapreduce-6990|https://issues.apache.org/jira/browse/MAPREDUCE-6990] -- This message was sent by Atlassian JIRA (v7.6.3#76005)