Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-19393

NonSyncDataInputBuffer.skipBytes hangs when the file is corrupted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 1.0.0, 2.3.2
    • None
    • SQL
    • None

    Description

      When an InputStream is corrupted, the InputStream.skip can return -1, causing the while loop in NonSyncDataInputBuffer.skipBytes become infinite.

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

      Similar bugs are Hadoop-8614, Yarn-2905, Yarn-163, Mapreduce-6990

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dustinday John Doe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: