Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQueryGoogleCloudStorageStoreOutput: fileNamePattern wrong naming. #87

Open
dlazerka opened this issue Feb 20, 2016 · 1 comment
Open

Comments

@dlazerka
Copy link

BigQueryGoogleCloudStorageStoreOutput requires "fileNamePattern" constructor parameter, but actually it does not accept pattern.
At first I wanted to know what pattern should be there (it's undocumented), so I've read the code of SizeSegmentedGoogleCloudStorageFileOutput, which says

   /** @param fileNamePattern a java format string {@link java.util.Formatter} containing one int
   *        argument for the shard number and another int argument for the segment number for e.g.
   *        shard-%04d-segment-%04d.

And supplied a String like "foo-%04d-bar-%04d", but it later throws an exception
java.util.MissingFormatArgumentException: Format specifier '04d'.

Debugged, it actually makes its own string:
BigQueryFilesToLoad/Job-fileNamePattern/Shard-%04d/file-%04d

I believe constructor parameter should be renamed to something like "jobName".

@aozarov
Copy link
Contributor

aozarov commented Feb 20, 2016

@dlazerka you are correct. Do you want to send a PR to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants