You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vb...@apache.org on 2023/03/10 08:01:54 UTC

[hudi] branch master updated: [HUDI-5333] Ignore file system type of basePath when using RocksDbBasedFileSystemView (#7387)

This is an automated email from the ASF dual-hosted git repository.

vbalaji pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 8129a85eebb [HUDI-5333] Ignore file system type of basePath when using RocksDbBasedFileSystemView (#7387)
8129a85eebb is described below

commit 8129a85eebb2562ce47b268fa838dd6bad7fd52e
Author: 矛始 <10...@qq.com>
AuthorDate: Fri Mar 10 16:01:44 2023 +0800

    [HUDI-5333] Ignore file system type of basePath when using RocksDbBasedFileSystemView (#7387)
    
    Co-authored-by: chenzhiming <ch...@chinatelecom.cn>
---
 .../main/java/org/apache/hudi/common/util/collection/RocksDBDAO.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hudi-common/src/main/java/org/apache/hudi/common/util/collection/RocksDBDAO.java b/hudi-common/src/main/java/org/apache/hudi/common/util/collection/RocksDBDAO.java
index 639b5ed4157..0d85d5a8076 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/util/collection/RocksDBDAO.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/util/collection/RocksDBDAO.java
@@ -44,6 +44,7 @@ import org.rocksdb.WriteOptions;
 import java.io.File;
 import java.io.IOException;
 import java.io.Serializable;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -69,7 +70,7 @@ public class RocksDBDAO {
 
   public RocksDBDAO(String basePath, String rocksDBBasePath) {
     this.rocksDBBasePath =
-        String.format("%s/%s/%s", rocksDBBasePath, basePath.replace("/", "_"), UUID.randomUUID().toString());
+        String.format("%s/%s/%s", rocksDBBasePath, URI.create(basePath).getPath().replace(":","").replace("/", "_"), UUID.randomUUID().toString());
     init();
     totalBytesWritten = 0L;
   }