-
Notifications
You must be signed in to change notification settings - Fork 110
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
Prefixed (HDFS, S3) paths should be treated as absolute/off-base #157
Comments
Hi @slotrans, I you should use an off-base path in this case:
Adding a "!" in front of your path turns the $BASE machinery off. Although it feels like a gotcha, I'm not sure if there's a better way of handling cases like this. If you think about how base directories work, it actually makes sense. |
HDFS paths are recognized as absolute paths without the off-base hint, are they not?. Why should S3 work differently? Put a different way, any filename that begins with protocol colon slash slash cannot possibly be a relative path, just like any filename that begins with slash cannot possibly be a relative path. Drake already knows how to handle the latter, so handling the former seems both trivial and necessary. |
Uh, I actually came here to ask the same question about HDFS paths and found your question. So no, they are not off-base and behave exactly the same way as s3 paths. Oh, I see what you mean about absolute paths. Yes, I agree, prefixed paths should be automatically treated as off-base, you're absolutely right. |
May I suggest renaming this issue to "Prefixed paths should be treated as absolute and off-base"? |
Done. |
When referencing an S3 path, e.g.
s3://my-bucket/prefix/myfile
, it is necessary to either blank-out BASE, or point it at S3, otherwise the default local-filesystem BASE will be prepended to the S3 path, giving a file reference like/Users/somejerk/someproject/s3://my-bucket/prefix/myfile
, which won't work. For example...This works:
This also works:
This does not:
The text was updated successfully, but these errors were encountered: