Skip to content

Conversation

@peihe
Copy link
Contributor

@peihe peihe commented Apr 15, 2016

No description provided.

@peihe
Copy link
Contributor Author

peihe commented Apr 15, 2016

R: @dhalperi

@dhalperi
Copy link
Contributor

Sorry for the delay. I was hoping to get @lukecwik 's opinion on this one.

@peihe peihe force-pushed the fix-path-resolve branch 3 times, most recently from 8e44737 to 394ca71 Compare April 20, 2016 00:22
}
String jobIdToken = UUID.randomUUID().toString();
String tempFilePrefix = options.getTempLocation() + "/BigQuerySinkTemp/" + jobIdToken;
String tempLocation = options.getTempLocation();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should rely on IOChannelUtils / IOChannelFactory and not call out to paths directly.
For example:
IOChannelFactory factory = IOChannelUtils.getFactory(path);
String tempFilePrefix = factory.resolve(factory.resolve(tempLocation, "BigQuerySinkTemp"), jobIdToken);
checkArgument(testBigQueryService == null || factory instanceof GCSIOChannelFactory, ....);

Other than this comment I think the code is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Removed the check of gcs path, since it is done in validate().
In there (line 993), I am using GcsPath directly and expect it fails for non gcs path.
I am not checking the GCSIOChannelFactory, because I think there might be other implementations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Dan, any additional comments?

@peihe peihe force-pushed the fix-path-resolve branch 2 times, most recently from e91dd9d to bc49128 Compare April 20, 2016 20:38
@peihe peihe force-pushed the fix-path-resolve branch from bc49128 to 620a37d Compare April 20, 2016 20:40
@asfgit asfgit closed this in 10e6284 Apr 22, 2016
swegner pushed a commit to swegner/beam that referenced this pull request Apr 22, 2016
Apply ModelEnforcement in the InProcessPipelineRunner
@peihe peihe deleted the fix-path-resolve branch August 15, 2017 09:24
iemejia pushed a commit to iemejia/beam that referenced this pull request Jan 12, 2018
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

Successfully merging this pull request may close these issues.

3 participants