Skip to content

[BEAM-1988] Migrate from utils.path to BFS#2643

Closed
sb2nov wants to merge 1 commit intoapache:masterfrom
sb2nov:BEAM-1988-path-join-filesystem-2
Closed

[BEAM-1988] Migrate from utils.path to BFS#2643
sb2nov wants to merge 1 commit intoapache:masterfrom
sb2nov:BEAM-1988-path-join-filesystem-2

Conversation

@sb2nov
Copy link
Contributor

@sb2nov sb2nov commented Apr 21, 2017

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

R: @chamikaramj @aaltay PTAL

@sb2nov
Copy link
Contributor Author

sb2nov commented Apr 22, 2017

Retest this please

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 75719dc on sb2nov:BEAM-1988-path-join-filesystem-2 into ** on apache:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 75719dc on sb2nov:BEAM-1988-path-join-filesystem-2 into ** on apache:master**.

self.google_cloud_options.staging_location = filesystem.join(
self.google_cloud_options.staging_location, path_suffix)
self.google_cloud_options.temp_location = utils.path.join(
self.google_cloud_options.temp_location = filesystem.join(
Copy link
Member

@aaltay aaltay Apr 23, 2017

Choose a reason for hiding this comment

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

What happens if temp_location is not a gcs location? It is an error by itself but the join part was handled correctly in the previous code.

I wonder if there is any value in something like bfs.join where bfs would call the right join method for the given type, avoiding calls to get_file_system.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think me and Cham discussed it at some point. I can work on that in another PR and clean the get_filesystem infiltration everywhere.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you.

@@ -284,13 +285,15 @@ def stage_job_resources(
raise RuntimeError(
'The --temp_location option must be specified.')
Copy link
Member

Choose a reason for hiding this comment

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

Why do we check for temp_location here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll investigate.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you does not need to happen in this PR if it is involved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just a sanity check as https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py#L325 would have already assigned temp_location to staging_location had it not been specified. I think we can leave it as is right now.

@aaltay
Copy link
Member

aaltay commented Apr 23, 2017

This PR LGTM as is. Are you planning to make any more changes in this PR?

@sb2nov
Copy link
Contributor Author

sb2nov commented Apr 23, 2017

No the two changes we discussed seem unrelated so I can do them in separate PRs.

@asfgit asfgit closed this in a670197 Apr 23, 2017
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 75719dc on sb2nov:BEAM-1988-path-join-filesystem-2 into ** on apache:master**.

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