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 2020/10/30 05:33:43 UTC
[hudi] 13/14: [RFC-15] Fixing getFileSystemView() which requires
getCompletedCommitsTimeline().
This is an automated email from the ASF dual-hosted git repository.
vinoth pushed a commit to branch rfc-15
in repository https://gitbox.apache.org/repos/asf/hudi.git
commit 4b7a4b3f867a6ddfe7e290d9a68e073388872a2e
Author: Prashant Wason <pw...@uber.com>
AuthorDate: Wed Oct 28 02:33:34 2020 -0700
[RFC-15] Fixing getFileSystemView() which requires getCompletedCommitsTimeline().
---
hudi-client/src/main/java/org/apache/hudi/table/HoodieTable.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hudi-client/src/main/java/org/apache/hudi/table/HoodieTable.java b/hudi-client/src/main/java/org/apache/hudi/table/HoodieTable.java
index 38988a4..286e6db 100644
--- a/hudi-client/src/main/java/org/apache/hudi/table/HoodieTable.java
+++ b/hudi-client/src/main/java/org/apache/hudi/table/HoodieTable.java
@@ -49,6 +49,7 @@ import org.apache.hudi.common.table.timeline.HoodieTimeline;
import org.apache.hudi.common.table.timeline.versioning.TimelineLayoutVersion;
import org.apache.hudi.common.table.view.FileSystemViewManager;
import org.apache.hudi.common.table.view.FileSystemViewStorageConfig;
+import org.apache.hudi.common.table.view.HoodieTableFileSystemView;
import org.apache.hudi.common.table.view.SyncableFileSystemView;
import org.apache.hudi.common.table.view.TableFileSystemView;
import org.apache.hudi.common.table.view.TableFileSystemView.BaseFileOnlyView;
@@ -238,7 +239,11 @@ public abstract class HoodieTable<T extends HoodieRecordPayload> implements Seri
* Get the view of the file system for this table.
*/
public TableFileSystemView getFileSystemView() {
- return getFileSystemViewInternal(getCompletedCommitsTimeline());
+ if (config.useFileListingMetadata()) {
+ return getFileSystemViewInternal(getCompletedCommitsTimeline());
+ } else {
+ return new HoodieTableFileSystemView(metaClient, getCompletedCommitsTimeline());
+ }
}
/**