[ 
https://issues.apache.org/jira/browse/HUDI-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17399180#comment-17399180
 ] 

ASF GitHub Bot commented on HUDI-2268:
--------------------------------------

nsivabalan commented on a change in pull request #3470:
URL: https://github.com/apache/hudi/pull/3470#discussion_r688930663



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/util/MarkerUtils.java
##########
@@ -216,4 +216,4 @@ public static void deleteMarkerTypeFile(FileSystem 
fileSystem, String markerDir)
       throw new HoodieIOException(ioe.getMessage(), ioe);
     }
   }
-}
+}

Review comment:
       Comment about L186. 
   I see we filter for entire file path when filtering for MARKERS.*. 
   shouldn't we fetch just filename and then do filtering? what incase basepath 
has "MARKERS" string in them? 
   
   I fixed this in TwoToOneDowngrade recreation when we delete the timeline 
based markers. 
   ```
   Predicate<FileStatus> prefixFilter = pathStr -> 
pathStr.getPath().getName().contains(MARKERS_FILENAME_PREFIX);
       List<String> markerDirSubPaths = Arrays.stream(fileStatuses)
           .filter(prefixFilter)
           .map(fileStatus -> fileStatus.getPath().toString())
           .collect(Collectors.toList());
   ```




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


> Upgrade hoodie table to 0.9.0
> -----------------------------
>
>                 Key: HUDI-2268
>                 URL: https://issues.apache.org/jira/browse/HUDI-2268
>             Project: Apache Hudi
>          Issue Type: Sub-task
>          Components: Usability
>            Reporter: sivabalan narayanan
>            Assignee: sivabalan narayanan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> Wrt upgrading/downgrading hoodie.properties, here is what we can go. 
> Add a new table version, 2. 
> Add an upgrade step:
> before every write operation. 
>      Check if existing hoodie.props is in an older version. If yes, perform 
> upgrade step to version2 (either from 0 to 2 or from 1 to 2). This 
> essentially means that we need to add new properties pertaining to sql dml to 
> hoodie.properties. 
> Things to watch out for:
> for some operations, not all props might be set by the user. So, we might 
> need to throw an exception. (record key field, partition path field, key gen 
> prop, precombine field). 
> We need to fetch latest table schema since the incoming df could have partial 
> cols.
>  
> Downgrade step: 
> hoodie.properties will have some additional properties. Should not cause any 
> harm. All we need to do is to downgrade the table version to target version 
> and not touch any of the props. 
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to