-
Notifications
You must be signed in to change notification settings - Fork 24
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
HPCC4J-630 Ensure Filespray path constructed correctly #739
HPCC4J-630 Ensure Filespray path constructed correctly #739
Conversation
Jira Issue: https://hpccsystems.atlassian.net/browse/HPCC4J-630 Jirabot Action Result: |
237e156
to
c04a83c
Compare
@jpmcmu please review |
a87ab8c
to
5b17b8a
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.
@rpastrana Looks good to me, a few questions and a typo but no required changes IMO
@@ -1005,7 +1005,7 @@ public ProgressResponseWrapper sprayVariable(DelimitedDataOptions options, DropZ | |||
|
|||
SprayVariable request = new SprayVariable(); | |||
request.setSourceIP(targetDropZone.getNetAddress()); | |||
request.setSourcePath(Utils.ensureTrailingPathSlash(targetDropZone.getPath()) + sourceFileName); | |||
request.setSourcePath(Utils.ensureTrailingPathSlash(Utils.appendPathSections(targetDropZone.getPath(),sourceFileName))); |
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.
Should there be a Utils function that builds the path and ensures there is trailing path slash?
@@ -1161,7 +1161,7 @@ public ProgressResponseWrapper sprayXML(DropZoneWrapper targetDropZone, String s | |||
|
|||
request.setDestGroup(destGroup); | |||
request.setSourceIP(targetDropZone.getNetAddress()); | |||
request.setSourcePath(Utils.ensureTrailingPathSlash(targetDropZone.getPath()) + sourceFileName); | |||
request.setSourcePath(Utils.ensureTrailingPathSlash(Utils.appendPathSections(targetDropZone.getPath(), sourceFileName))); |
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.
Is the trailing path slash still needed here, or was that a requirement due to how the paths were being built?
@@ -1317,7 +1317,7 @@ public ProgressResponseWrapper sprayFixed(DropZoneWrapper targetDropZone, String | |||
request.setDestGroup(destGroup); | |||
request.setSourceRecordSize(recordSize); | |||
request.setSourceIP(targetDropZone.getNetAddress()); | |||
request.setSourcePath(Utils.ensureTrailingPathSlash(targetDropZone.getPath()) + sourceFileName); | |||
request.setSourcePath(Utils.ensureTrailingPathSlash(Utils.appendPathSections(targetDropZone.getPath(), sourceFileName))); |
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.
What are the valid path schemas? Is it just Linux or are Windows paths valid?
} | ||
catch (Exception e) | ||
{ | ||
throw new Exception("Could not append path sections, ensure original path sections are valid contain path seperator"); |
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.
Typo here missing an and
- Adds util methods to append paths - Adds util methods to detect path seperator from sample path - Adds junit test for new methods - Ensures wsfs methods use new util path append method - Ends wsfs use of ensuretrailingslash method Signed-off-by: Rodrigo Pastrana <[email protected]>
5b17b8a
to
8b203ac
Compare
@jpmcmu please take a look again. You're right, there was no longer a need to ensure the trailing path on the properly appended path |
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.
@rpastrana looks good to me
@jchambers-ln this pr is ready to merge, existing tests passed. We can hold up the merge, If you'd like to verify fix |
I've verified this should fix the issue; I didn't go sniffing all the edge cases, but it solves the issue we were seeing with alpha dev not being able to spray files. |
Jirabot Action Result: |
Type of change:
Checklist:
Testing: