Search in sources :

Example 1 with FileSystemViewStorageType

use of org.apache.hudi.common.table.view.FileSystemViewStorageType in project hudi by apache.

the class EmbeddedTimelineService method createViewManager.

private FileSystemViewManager createViewManager() {
    // Using passed-in configs to build view storage configs
    FileSystemViewStorageConfig.Builder builder = FileSystemViewStorageConfig.newBuilder().fromProperties(writeConfig.getClientSpecifiedViewStorageConfig().getProps());
    FileSystemViewStorageType storageType = builder.build().getStorageType();
    if (storageType.equals(FileSystemViewStorageType.REMOTE_ONLY) || storageType.equals(FileSystemViewStorageType.REMOTE_FIRST)) {
        // Reset to default if set to Remote
        builder.withStorageType(FileSystemViewStorageType.MEMORY);
    }
    return FileSystemViewManager.createViewManager(context, writeConfig.getMetadataConfig(), builder.build(), writeConfig.getCommonConfig(), basePath);
}
Also used : FileSystemViewStorageConfig(org.apache.hudi.common.table.view.FileSystemViewStorageConfig) FileSystemViewStorageType(org.apache.hudi.common.table.view.FileSystemViewStorageType)

Aggregations

FileSystemViewStorageConfig (org.apache.hudi.common.table.view.FileSystemViewStorageConfig)1 FileSystemViewStorageType (org.apache.hudi.common.table.view.FileSystemViewStorageType)1