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

OrcOutputFormat#getRecordWriter creates OrcRecordWriter with relative path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.12.0
    • 0.12.1
    • File Formats
    • None

    Description

      Hi,
      OrcOutputFormat#getRecordWriter creates OrcRecordWriter instance using a file with relative path actually.

      return new OrcRecordWriter(new Path(name), OrcFile.writerOptions(conf));

      https://github.com/apache/hive/blob/7263b3bb1632b1a7c6ef5d2363e58020e1fdd756/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcOutputFormat.java#L114

      The fix should be very simple, just as RCFileOutputFormat#getRecordWriter, append work output path as the parent:

      Path outputPath = getWorkOutputPath(job);
      Path file = new Path(outputPath, name);

      https://github.com/apache/hive/blob/d85eea2dc5decbf23e8f4010b32f1817cf057ea0/ql/src/java/org/apache/hadoop/hive/ql/io/RCFileOutputFormat.java#L78

      Attachments

        Activity

          People

            Unassigned Unassigned
            branky Branky Shao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: