You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "codope (via GitHub)" <gi...@apache.org> on 2023/11/16 12:29:20 UTC
Re: [PR] [HUDI-6734] Add back HUDI-5409: Avoid file index and use fs view cache in COW input format [hudi]
codope commented on code in PR #9567:
URL: https://github.com/apache/hudi/pull/9567#discussion_r1395622480
##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieCopyOnWriteTableInputFormat.java:
##########
@@ -241,31 +246,83 @@ 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();
-
- targetFiles.addAll(
- partitionedFileSlices.values()
- .stream()
- .flatMap(Collection::stream)
- .filter(fileSlice -> checkIfValidFileSlice(fileSlice))
- .map(fileSlice -> createFileStatusUnchecked(fileSlice, fileIndex, tableMetaClient))
- .collect(Collectors.toList())
- );
+ if (conf.getBoolean(ENABLE.key(), ENABLE.defaultValue()) && HoodieTableMetadataUtil.isFilesPartitionAvailable(tableMetaClient)) {
Review Comment:
Shall we disregard `ENABLE` if the files partition is available?
--
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