zhangyue19921010 opened a new issue, #11394:
URL: https://github.com/apache/paimon/issues/11394
### Search before asking
- [x] I searched existing issues and found no report for a relative
`setWorkingDirectory` call.
### Paimon version
`master` at `6a9e258775f0e43431c48b8fb22469b1b02c8ca5` (2.2-SNAPSHOT).
### Compute Engine
Hadoop `FileSystem` API (Hadoop 3.3.4) with `paimon-vfs-hadoop`, a local
filesystem-backed REST Object Table, and JDK 11.
### Minimal reproduce step
After configuring Hadoop for PVFS, create an Object Table
`my_database.my_table` in `my_catalog`:
```java
FileSystem fs = new Path("pvfs://my_catalog/").getFileSystem(conf);
fs.setWorkingDirectory(new Path("pvfs://my_catalog/my_database/my_table"));
fs.setWorkingDirectory(new Path("data"));
try (FSDataOutputStream out = fs.create(new Path("file.txt"))) {
out.writeInt(42);
}
```
### What doesn't meet your expectations?
The second call should change the working directory to
`pvfs://my_catalog/my_database/my_table/data`, so opening or creating
`file.txt` uses that directory. Instead, PVFS stores `data` as the working
directory, then `create` fails with `IllegalArgumentException` caused by
`URISyntaxException: Relative path in absolute URI`.
### Anything else?
#9507 fixes the initial catalog-root working directory. This failure happens
later, when a caller passes a relative path to `setWorkingDirectory`.
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]