Relative Path Handling
Closed this issue · 3 comments
jbunting commented
I'm opening this issue for discussion purposes.
I started writing some tests related to relative paths, and the behavior is unexpected. Then I stumbled on this line of code in HadoopPath.toAbsolutePath:
byte[] defaultdir = "/".getBytes(); //this.hdfs.getDefaultDir().path;
This led me to believe that handling of relative paths hadn't been addressed yet. After doing some reading on the jsr203 API and looking at the hadoop FileSystem
API, I think that getDefaultDir()
should be implemented something like this:
HadoopPath getDefaultDir() {
// TODO : add charset management
// TODO: simplify getting bytes from the working directory path
return new HadoopPath(this, this.fs.getWorkingDirectory().toUri().getPath().getBytes());
}
Thoughts?
damiencarol commented
Need to check something again before make a comment.
damiencarol commented
damiencarol commented
Closing this after no feedback.
@jbunting feel free to open a new issue if you have the same pb again.