XuQianJin-Stars commented on code in PR #5572:
URL: https://github.com/apache/hudi/pull/5572#discussion_r872955363
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -459,6 +459,9 @@ private Stream<HoodieInstant> getCommitInstantsToArchive() {
private Stream<HoodieInstant> getInstantsToArchive() {
Stream<HoodieInstant> instants =
Stream.concat(getCleanInstantsToArchive(), getCommitInstantsToArchive());
+ if (config.isMetastoreEnabled()) {
+ return Stream.empty();
Review Comment:
Why is `isMetastoreEnabled` turned on and `Stream.empty()` is returned here?
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/FileSystemViewManager.java:
##########
@@ -165,6 +167,11 @@ private static HoodieTableFileSystemView
createInMemoryFileSystemView(HoodieMeta
return new HoodieMetadataFileSystemView(metaClient,
metaClient.getActiveTimeline().filterCompletedAndCompactionInstants(),
metadataSupplier.get());
}
+ if (metaClient.getMetastoreConfig().enableMetastore()) {
+ return (HoodieTableFileSystemView)
ReflectionUtils.loadClass("org.apache.hudi.common.table.view.HoodieMetastoreFileSystemView",
Review Comment:
Ditto
##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java:
##########
@@ -612,6 +623,21 @@ public void initializeBootstrapDirsIfNotExists() throws
IOException {
initializeBootstrapDirsIfNotExists(getHadoopConf(), basePath.toString(),
getFs());
}
+ private static HoodieTableMetaClient newMetaClient(Configuration conf,
String basePath, boolean loadActiveTimelineOnLoad,
+ ConsistencyGuardConfig consistencyGuardConfig,
Option<TimelineLayoutVersion> layoutVersion,
+ String payloadClassName, FileSystemRetryConfig fileSystemRetryConfig,
Properties props) {
+ HoodieMetastoreConfig metastoreConfig = null == props
+ ? new HoodieMetastoreConfig.Builder().build()
+ : new HoodieMetastoreConfig.Builder().fromProperties(props).build();
+ return metastoreConfig.enableMetastore()
+ ? (HoodieTableMetaClient)
ReflectionUtils.loadClass("org.apache.hudi.common.table.HoodieTableMetastoreClient",
Review Comment:
Add some instructions to remove this reflection after the
HoodieTableMetastoreClient is fully integrated.
##########
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieMetastoreConfig.java:
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.config;
+
+import javax.annotation.concurrent.Immutable;
+import java.util.Properties;
+
+/**
+ * Configurations used by the HUDI Metadata Table.
Review Comment:
HUDI Metadata Table -> HUDI Metastore?
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/FileSystemViewManager.java:
##########
@@ -184,6 +191,11 @@ public static HoodieTableFileSystemView
createInMemoryFileSystemViewWithTimeline
if (metadataConfig.enabled()) {
return new HoodieMetadataFileSystemView(engineContext, metaClient,
timeline, metadataConfig);
}
+ if (metaClient.getMetastoreConfig().enableMetastore()) {
+ return (HoodieTableFileSystemView)
ReflectionUtils.loadClass("org.apache.hudi.common.table.view.HoodieMetastoreFileSystemView",
Review Comment:
Ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]