vinothchandar commented on a change in pull request #1009:  [HUDI-308] Avoid 
Renames for tracking state transitions of all actions on dataset
URL: https://github.com/apache/incubator-hudi/pull/1009#discussion_r357162132
 
 

 ##########
 File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java
 ##########
 @@ -274,25 +286,35 @@ public synchronized HoodieArchivedTimeline 
getArchivedTimeline() {
    */
   public static HoodieTableMetaClient initTableType(Configuration hadoopConf, 
String basePath, String tableType,
       String tableName, String archiveLogFolder) throws IOException {
-    HoodieTableType type = HoodieTableType.valueOf(tableType);
-    Properties properties = new Properties();
-    properties.put(HoodieTableConfig.HOODIE_TABLE_NAME_PROP_NAME, tableName);
-    properties.put(HoodieTableConfig.HOODIE_TABLE_TYPE_PROP_NAME, type.name());
-    properties.put(HoodieTableConfig.HOODIE_ARCHIVELOG_FOLDER_PROP_NAME, 
archiveLogFolder);
-    return HoodieTableMetaClient.initDatasetAndGetMetaClient(hadoopConf, 
basePath, properties);
+    return initTableType(hadoopConf, basePath, 
HoodieTableType.valueOf(tableType), tableName,
+        archiveLogFolder, null, null);
   }
 
   /**
    * Helper method to initialize a given path, as a given storage type and 
table name.
    */
   public static HoodieTableMetaClient initTableType(Configuration hadoopConf, 
String basePath,
       HoodieTableType tableType, String tableName, String payloadClassName) 
throws IOException {
+    return initTableType(hadoopConf, basePath, tableType, tableName, null, 
payloadClassName, null);
+  }
+
+  public static HoodieTableMetaClient initTableType(Configuration hadoopConf, 
String basePath,
+      HoodieTableType tableType, String tableName, String archiveLogFolder, 
String payloadClassName,
+      Integer timelineLayoutVersion) throws IOException {
     Properties properties = new Properties();
     properties.setProperty(HoodieTableConfig.HOODIE_TABLE_NAME_PROP_NAME, 
tableName);
     properties.setProperty(HoodieTableConfig.HOODIE_TABLE_TYPE_PROP_NAME, 
tableType.name());
-    if (tableType == HoodieTableType.MERGE_ON_READ) {
+    if ((tableType == HoodieTableType.MERGE_ON_READ) && (payloadClassName != 
null)) {
 
 Review comment:
   Redundant braces?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to