You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vi...@apache.org on 2019/07/25 04:31:51 UTC
[incubator-hudi] branch master updated: Allow
HoodieWrapperFileSystem to wrap other proxy file-system implementations
with no getScheme implementation (#793)
This is an automated email from the ASF dual-hosted git repository.
vinoth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 83dab21 Allow HoodieWrapperFileSystem to wrap other proxy file-system implementations with no getScheme implementation (#793)
83dab21 is described below
commit 83dab21ae13137270df79c1b731b131ed3a24aa1
Author: Balaji Varadarajan <va...@uber.com>
AuthorDate: Wed Jul 24 21:31:46 2019 -0700
Allow HoodieWrapperFileSystem to wrap other proxy file-system implementations with no getScheme implementation (#793)
---
.../uber/hoodie/common/io/storage/HoodieWrapperFileSystem.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hoodie-common/src/main/java/com/uber/hoodie/common/io/storage/HoodieWrapperFileSystem.java b/hoodie-common/src/main/java/com/uber/hoodie/common/io/storage/HoodieWrapperFileSystem.java
index 72e2d57..a234a3b 100644
--- a/hoodie-common/src/main/java/com/uber/hoodie/common/io/storage/HoodieWrapperFileSystem.java
+++ b/hoodie-common/src/main/java/com/uber/hoodie/common/io/storage/HoodieWrapperFileSystem.java
@@ -121,13 +121,15 @@ public class HoodieWrapperFileSystem extends FileSystem {
// Remove 'hoodie-' prefix from path
if (path.toString().startsWith(HOODIE_SCHEME_PREFIX)) {
path = new Path(path.toString().replace(HOODIE_SCHEME_PREFIX, ""));
+ this.uri = path.toUri();
+ } else {
+ this.uri = uri;
}
this.fileSystem = FSUtils.getFs(path.toString(), conf);
// Do not need to explicitly initialize the default filesystem, its done already in the above
// FileSystem.get
// fileSystem.initialize(FileSystem.getDefaultUri(conf), conf);
// fileSystem.setConf(conf);
- this.uri = uri;
}
@Override
@@ -861,11 +863,11 @@ public class HoodieWrapperFileSystem extends FileSystem {
}
public Path convertToHoodiePath(Path oldPath) {
- return convertPathWithScheme(oldPath, getHoodieScheme(fileSystem.getScheme()));
+ return convertPathWithScheme(oldPath, getHoodieScheme(getScheme()));
}
private Path convertToDefaultPath(Path oldPath) {
- return convertPathWithScheme(oldPath, fileSystem.getScheme());
+ return convertPathWithScheme(oldPath, getScheme());
}
private Path convertToLocalPath(Path oldPath) {