hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1255: [HUDI-559] : Make sure by default table layout version honors the configuration in hoodie.properties
Date Mon, 20 Jan 2020 04:30:05 GMT
vinothchandar commented on a change in pull request #1255: [HUDI-559] : Make sure by default
table layout version honors the configuration in hoodie.properties
URL: https://github.com/apache/incubator-hudi/pull/1255#discussion_r368363395
 
 

 ##########
 File path: hudi-client/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java
 ##########
 @@ -145,7 +145,8 @@ public Boolean shouldAssumeDatePartitioning() {
   }
 
   public Integer getTimelineLayoutVersion() {
-    return Integer.parseInt(props.getProperty(TIMELINE_LAYOUT_VERSION));
+    return props.containsKey(TIMELINE_LAYOUT_VERSION)
+        ? Integer.parseInt(props.getProperty(TIMELINE_LAYOUT_VERSION)) : null;
 
 Review comment:
   Good point.. In an ideal world, `hoodie.properties` is the source of truth and once you
set this version there, both timeline writers and readers respect that.. but the issue here
seems to be that we want to change this to say VERSION_1 even for older tables and rely on
the fact that null version and version_1 both can be read by older readers.. 
   
   > If we keep version_0 as default, it would override the version even for new tables
which has Version_1 in hoodie.properties
   
   I'd imagine this will happen only if at some point, the user set the value to `version_1`
and then switched back to default? This can always happen right, like the user going back
to the previous release.. ? 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message