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
Conversation
dhalperi
commented
May 12, 2017
•
edited
edited
- 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.
e258d55
to
1420d7f
Compare
file2.getCurrentDirectory().toString()) | ||
.testEquals(); | ||
|
||
// TODO: test resolving strings that need to be escaped (what is the spec?). |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default PipelineOptions?
…ntations A first cut at some of the parts of the ResourceId spec.
* Drop empty authority always * Resolve directories
1420d7f
to
f24ebb8
Compare
Still todo:
|
And document that it's not for users.
f24ebb8
to
00c02ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
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