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

[BEAM-2277] Add ResourceIdTester and test existing ResourceId implementations #3121

Closed
wants to merge 6 commits into from

Conversation

dhalperi
Copy link
Contributor

@dhalperi dhalperi commented May 12, 2017

  • Mark everything FileSystem-related as Experimental.
  • Add ResourceIdTester, which validates a ResourceId implementation.
  • Update HadoopResourceId to meet spec.
  • Rename FileSystems#setDefaultConfigInWorkers and document.
  • Further improve Scheme determining and rename variable away from URI.

file2.getCurrentDirectory().toString())
.testEquals();

// TODO: test resolving strings that need to be escaped (what is the spec?).
Copy link
Member

Choose a reason for hiding this comment

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

The URI spec has a set of delimiter characters, the issue is that %41 and A are the same from the URI perspective and should really go through a URI normalizer if we rely on the string versions for anything.

Add this link to your comments which talks about the characters specifically:
https://tools.ietf.org/html/rfc3986#section-2


@Test
public void testResourceIdTester() throws Exception {
FileSystems.setDefaultConfigInWorkers(TestPipeline.testingPipelineOptions());
Copy link
Member

Choose a reason for hiding this comment

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

I think you want to set the Configuration on PipelineOptions and not use TestPipeline.testingPipelineOptions here

@@ -163,6 +166,12 @@ public void testGetFilename() throws Exception {
"xyz.txt");
}

@Test
public void testResourceIdTester() throws Exception {
FileSystems.setDefaultConfigInWorkers(TestPipeline.testingPipelineOptions());
Copy link
Member

Choose a reason for hiding this comment

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

Default PipelineOptions?

@dhalperi
Copy link
Contributor Author

Still todo:

  • fix the glob issue in FileBasedSink by adding a new API
  • review Javadoc.

And document that it's not for users.
Copy link
Member

@davorbonaci davorbonaci left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 70.221% when pulling 2c556c6 on dhalperi:b2277-resourceid-tester into 0acf362 on apache:master.

@asfgit asfgit closed this in 9f81fd2 May 12, 2017
dhalperi added a commit to dhalperi/beam that referenced this pull request May 12, 2017
fbb0de1 Remove '/' entirely from determining FileSystem scheme
a6a5ff7 [BEAM-2277] Add ResourceIdTester and test existing ResourceId implementations
ec956c8 Mark FileSystem and related as Experimental
15df211 [BEAM-2277] HadoopFileSystem: normalize implementation
f3540d4 Rename FileSystems.setDefaultConfigInWorkers
3921163 Fix shading of guava testlib
asfgit pushed a commit that referenced this pull request May 12, 2017
fbb0de1 Remove '/' entirely from determining FileSystem scheme
a6a5ff7 [BEAM-2277] Add ResourceIdTester and test existing ResourceId implementations
ec956c8 Mark FileSystem and related as Experimental
15df211 [BEAM-2277] HadoopFileSystem: normalize implementation
f3540d4 Rename FileSystems.setDefaultConfigInWorkers
3921163 Fix shading of guava testlib
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 70.225% when pulling 2c556c6 on dhalperi:b2277-resourceid-tester into 0acf362 on apache:master.

@dhalperi dhalperi deleted the b2277-resourceid-tester branch May 15, 2017 18:08
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.

None yet

4 participants