public class FileSystemViewManager extends Object
FileSystemView can be stored "locally" using the following storage mechanisms: a. In Memory b. Spillable Map c. RocksDB.
But there can be cases where the file-system view is managed remoted. For example : Embedded Timeline Server). In this case, the clients will configure a remote filesystem view client (RemoteHoodieTableFileSystemView) for the table which can connect to the remote file system view and fetch views. There are 2 modes here : REMOTE_FIRST and REMOTE_ONLY. REMOTE_FIRST : The file-system view implementation on client side will act as a remote proxy. In case, if there is problem (or exceptions) querying remote file-system view, a backup local file-system view(using either one of in-memory, spillable, rocksDB) is used to server file-system view queries. REMOTE_ONLY : In this case, there is no backup local file-system view. If there is problem (or exceptions) querying remote file-system view, then the exceptions are percolated back to client.
FileSystemViewManager is designed to encapsulate the file-system view storage from clients using the file-system view. FileSystemViewManager uses a factory to construct specific implementation of file-system view and passes it to clients for querying.
public void clearFileSystemView(String basePath)
basePath - Hoodie table base pathpublic SyncableFileSystemView getFileSystemView(String basePath)
basePath - Hoodie table base pathSyncableFileSystemViewpublic SyncableFileSystemView getFileSystemView(HoodieTableMetaClient metaClient)
metaClient - HoodieTableMetaClientSyncableFileSystemViewpublic void close()
public static HoodieTableFileSystemView createInMemoryFileSystemView(HoodieEngineContext engineContext, HoodieTableMetaClient metaClient, HoodieMetadataConfig metadataConfig)
public static HoodieTableFileSystemView createInMemoryFileSystemViewWithTimeline(HoodieEngineContext engineContext, HoodieTableMetaClient metaClient, HoodieMetadataConfig metadataConfig, HoodieTimeline timeline)
public static FileSystemViewManager createViewManagerWithTableMetadata(HoodieEngineContext context, HoodieMetadataConfig metadataConfig, FileSystemViewStorageConfig config, HoodieCommonConfig commonConfig)
public static FileSystemViewManager createViewManager(HoodieEngineContext context, FileSystemViewStorageConfig config, HoodieCommonConfig commonConfig)
public static FileSystemViewManager createViewManager(HoodieEngineContext context, FileSystemViewStorageConfig config, HoodieCommonConfig commonConfig, SerializableFunctionUnchecked<HoodieTableMetaClient,HoodieTableMetadata> metadataCreator)
Copyright © 2024 The Apache Software Foundation. All rights reserved.