You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Eugene Kirpichov (JIRA)" <ji...@apache.org> on 2017/07/17 21:36:00 UTC

[jira] [Created] (BEAM-2628) AvroSource.split() sequentially opens every matched file

Eugene Kirpichov created BEAM-2628:
--------------------------------------

             Summary: AvroSource.split() sequentially opens every matched file
                 Key: BEAM-2628
                 URL: https://issues.apache.org/jira/browse/BEAM-2628
             Project: Beam
          Issue Type: Bug
          Components: sdk-java-core
            Reporter: Eugene Kirpichov
            Assignee: Eugene Kirpichov


When you do AvroIO.read().from(filepattern), during splitting of AvroSource the filepattern gets expanded into N files, and then for each of the N files we do this: https://github.com/apache/beam/blob/v2.0.0/sdks/java/core/src/main/java/org/apache/beam/sdk/io/AvroSource.java#L259

This is very slow. E.g. one job was reading 15,000 files, and it took almost 2 hours to split the source because opening each file and reading schema was taking about 0.5s.

I'm not quite sure why we need the file metadata while splitting...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)