pvary commented on a change in pull request #2750: URL: https://github.com/apache/hive/pull/2750#discussion_r742710137
########## File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java ########## @@ -118,6 +115,13 @@ if (splitSize > 0) { scan = scan.option(TableProperties.SPLIT_SIZE, String.valueOf(splitSize)); } + // In case of LLAP-based execution we ask Iceberg not to combine multiple fileScanTasks into one split. + // This is so that cache affinity can work, and each file(split) is executed/cached on always the same LLAP daemon. + MapWork mapWork = LlapHiveUtils.findMapWork((JobConf) conf); + if (mapWork != null && mapWork.getCacheAffinity()) { + Long openFileCost = splitSize > 0 ? splitSize : TableProperties.SPLIT_SIZE_DEFAULT; + scan = scan.option(TableProperties.SPLIT_OPEN_FILE_COST, String.valueOf(openFileCost)); Review comment: Why will setting the split size as an open file cost will cause scan to use individual files as splits? -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org