alexeykudinkin commented on code in PR #7527:
URL: https://github.com/apache/hudi/pull/7527#discussion_r1054874088
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieCopyOnWriteTableInputFormat.java:
##########
@@ -247,81 +239,33 @@ private List<FileStatus>
listStatusForSnapshotMode(JobConf job,
boolean shouldIncludePendingCommits =
HoodieHiveUtils.shouldIncludePendingCommits(job,
tableMetaClient.getTableConfig().getTableName());
+ HiveHoodieTableFileIndex fileIndex =
+ new HiveHoodieTableFileIndex(
+ engineContext,
+ tableMetaClient,
+ props,
+ HoodieTableQueryType.SNAPSHOT,
+ partitionPaths,
+ queryCommitInstant,
+ shouldIncludePendingCommits);
+
+ Map<String, List<FileSlice>> partitionedFileSlices =
fileIndex.listFileSlices();
+
// NOTE: Fetching virtual key info is a costly operation as it needs to
load the commit metadata.
// This is only needed for MOR realtime splits. Hence, for COW
tables, this can be avoided.
Option<HoodieVirtualKeyInfo> virtualKeyInfoOpt =
tableMetaClient.getTableType().equals(COPY_ON_WRITE) ? Option.empty() :
getHoodieVirtualKeyInfo(tableMetaClient);
Review Comment:
I'd suggest we take this fix one step further -- instead of fetching virtual
key-info here let's push it inside `createFileStatusUnchecked` by pass the
meta-client in there
--
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]