You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/12/21 06:26:09 UTC

[GitHub] [hudi] codope commented on a diff in pull request #7527: [HUDI-5411] Avoid virtual key info for COW table in the input format

codope commented on code in PR #7527:
URL: https://github.com/apache/hudi/pull/7527#discussion_r1054022432


##########
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:
   This is the main change. Earlier it used to be simply 
   `Option<HoodieVirtualKeyInfo> virtualKeyInfoOpt = getHoodieVirtualKeyInfo(tableMetaClient);`.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org