n3nash commented on a change in pull request #2374:
URL: https://github.com/apache/hudi/pull/2374#discussion_r569199577



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
##########
@@ -230,13 +235,18 @@ protected void initTableMetadata() {
     }
   }
 
-  protected void bootstrapIfNeeded(HoodieEngineContext engineContext, 
HoodieTableMetaClient datasetMetaClient) throws IOException {
-    HoodieTimer timer = new HoodieTimer().startTimer();
-    boolean exists = datasetMetaClient.getFs().exists(new 
Path(metadataWriteConfig.getBasePath(), HoodieTableMetaClient.METAFOLDER_NAME));
-    if (!exists) {
-      // Initialize for the first time by listing partitions and files 
directly from the file system
-      bootstrapFromFilesystem(engineContext, datasetMetaClient);
-      metrics.ifPresent(m -> 
m.updateMetrics(HoodieMetadataMetrics.INITIALIZE_STR, timer.endTimer()));
+  protected void bootstrapIfNeeded(HoodieEngineContext engineContext, 
HoodieTableMetaClient datasetMetaClient) {

Review comment:
       refactored to `bootstrapMetadata`

##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
##########
@@ -88,7 +88,7 @@
   protected SerializableConfiguration hadoopConf;
   protected final transient HoodieEngineContext engineContext;
 
-  protected HoodieBackedTableMetadataWriter(Configuration hadoopConf, 
HoodieWriteConfig writeConfig, HoodieEngineContext engineContext) {
+  protected HoodieBackedTableMetadataWriter(Configuration hadoopConf, 
HoodieWriteConfig writeConfig, HoodieEngineContext engineContext, boolean 
bootstrapIfNeeded) {

Review comment:
       refactored to `bootstrapMetadata` 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to