GitHub user flaviocf opened a pull request:

    https://github.com/apache/beam/pull/3521

    [BEAM-2298] Making LocalFileSystem default and stripping file spec prefixes.

    Hi @lukecwik, can you please take a look?
    
    Windows OS currently has three problems reading file specs from pipeline 
options.
    1. The scheme parsing fails to recognize local drive as local filesystem.
    2. It fails if we add “file:” to start of path (also true for Linux)
    3. It doesn’t recognize glob (*) in file matching.
    
    This change fixes problem number 1 and 2, not 3. Because of that, more 
tests run in Windows OS start passing, but the glob tests still fail.
    
    The approach is to set LocalFileSystem as default, remove "file:", and get 
rid of any forward-slashes in the beginning of paths for Windows OS, since 
Windows Path Parser rejects slashes before the drive specification.
    
    From the examples linked in the JIRA issue:
    inputFile=c:/Users/lcwik/Desktop/beamRC4Java/word-count-beam/pom.xml (Still 
works)
    inputFile=c:/Users/lcwik/Desktop/beamRC4Java/word-count-beam/pom.x* (Still 
doesn’t work, because of glob)
    inputFile=file:/c:/Users/lcwik/Desktop/beamRC4Java/word-count-beam/pom.xml 
(Starts working)
    
inputFile=file:///c:/Users/lcwik/Desktop/beamRC4Java/word-count-beam/pom.xml 
(Starts working)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/flaviocf/beam osbug

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/beam/pull/3521.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3521
    
----
commit 5273be6078da8097bf612cfdd21d51934a399743
Author: Flavio Fiszman <[email protected]>
Date:   2017-06-30T17:14:34Z

    Adding local filesystem as default and stripping away prefix from local 
files in pipeline options.

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to