[
https://issues.apache.org/jira/browse/HUDI-8282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889509#comment-17889509
]
Y Ethan Guo commented on HUDI-8282:
-----------------------------------
For the usage in BaseRollbackHelper (see the code below), it is for the old
rollback plan containing non-empty list of "logBlocksToBeDeleted" used by table
version 6 and below (Hudi 0.x releases). In Hudi 1.0 and table version 8, the
log files to be deleted are added to the list of "filesToBeDeleted" in the
rollback plan, which are deleted directly. So there is no problem here. We
can consider removing the following "else if" branch to keep the code clean.
{code:java}
else if (!rollbackRequest.getLogBlocksToBeDeleted().isEmpty()) {
HoodieLogFormat.Writer writer = null;
final StoragePath filePath;
try {
String fileId = rollbackRequest.getFileId();
writer = HoodieLogFormat.newWriterBuilder()
.onParentPath(FSUtils.constructAbsolutePath(metaClient.getBasePath(),
rollbackRequest.getPartitionPath()))
.withFileId(fileId)
.withDeltaCommit(instantToRollback.getTimestamp())
.withStorage(metaClient.getStorage())
.withFileExtension(HoodieLogFile.DELTA_EXTENSION).build();
// generate metadata
if (doDelete) {
Map<HoodieLogBlock.HeaderMetadataType, String> header =
generateHeader(instantToRollback.getTimestamp());
// if update belongs to an existing log file
// use the log file path from AppendResult in case the file handle may
roll over
filePath = writer.appendBlock(new
HoodieCommandBlock(header)).logFile().getPath();
} else {
filePath = writer.getLogFile().getPath();
} {code}
> Create per log file marker for 1.x
> -----------------------------------
>
> Key: HUDI-8282
> URL: https://issues.apache.org/jira/browse/HUDI-8282
> Project: Apache Hudi
> Issue Type: Improvement
> Components: writer-core
> Reporter: sivabalan narayanan
> Assignee: sivabalan narayanan
> Priority: Blocker
> Fix For: 1.0.0
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> This ticket is meant for 1.x. We added per log file marker which was added to
> 0.x branch https://issues.apache.org/jira/browse/HUDI-1517
>
> Commit of interest:
> [https://github.com/apache/hudi/commit/c2c7e0538f8cf3031781ebdd776d1c03bfec3bb3]
>
>
> We might need to add a similar support to 1.x, hence the tracking ticket.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)