bhasudha commented on a change in pull request #689: [HUDI-25] Optimize
HoodieInputFormat.listStatus for faster Hive Incremental queries
URL: https://github.com/apache/incubator-hudi/pull/689#discussion_r287533666
##########
File path:
hoodie-hadoop-mr/src/main/java/com/uber/hoodie/hadoop/HoodieInputFormat.java
##########
@@ -62,65 +66,53 @@
@Override
public FileStatus[] listStatus(JobConf job) throws IOException {
- // Get all the file status from FileInputFormat and then do the filter
- FileStatus[] fileStatuses = super.listStatus(job);
- Map<HoodieTableMetaClient, List<FileStatus>> groupedFileStatus =
groupFileStatus(fileStatuses);
- LOG.info("Found a total of " + groupedFileStatus.size() + " groups");
+ // Segregate inputPaths[] to incremental, non incremental and non hoodie
paths
+ List<String> incrementalTables =
HoodieHiveUtil.getIncrementalTableNames(Job.getInstance(job));
+ InputPathHandler inputPathHandler = new
InputPathHandler(getInputPaths(job), incrementalTables);
List<FileStatus> returns = new ArrayList<>();
- for (Map.Entry<HoodieTableMetaClient, List<FileStatus>> entry :
groupedFileStatus.entrySet()) {
- HoodieTableMetaClient metadata = entry.getKey();
- if (metadata == null) {
- // Add all the paths which are not hoodie specific
- returns.addAll(entry.getValue());
+
+ Map<String, HoodieTableMetaClient> tableMetaClientMap =
inputPathHandler.tableMetaClientMap;
Review comment:
done!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services