orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omalley <...@git.apache.org>
Subject [GitHub] orc pull request #163: ORC-162. Handle 0 byte files as empty ORC files.
Date Thu, 31 Aug 2017 22:51:32 GMT
Github user omalley commented on a diff in the pull request:

    https://github.com/apache/orc/pull/163#discussion_r136466870
  
    --- Diff: java/mapreduce/src/java/org/apache/orc/mapred/OrcInputFormat.java ---
    @@ -151,4 +153,26 @@ public static void setSearchArgument(Configuration conf,
         return new OrcMapredRecordReader<>(file, buildOptions(conf,
             file, split.getStart(), split.getLength()));
       }
    +
    +  /**
    +   * Filter out the 0 byte files, so that we don't generate splits for the
    +   * empty ORC files.
    +   * @param job the job configuration
    +   * @return a list of files that need to be read
    +   * @throws IOException
    +   */
    +  protected FileStatus[] listStatus(JobConf job) throws IOException {
    +    FileStatus[] result = super.listStatus(job);
    +    List<FileStatus> ok = new ArrayList<>(result.length);
    --- End diff --
    
    That would involve doing a second getStatus. Filters are only given the name.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message