pvary commented on a change in pull request #2228:
URL: https://github.com/apache/iceberg/pull/2228#discussion_r598610849
##########
File path:
mr/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
##########
@@ -114,6 +114,12 @@ public void configureJobConf(TableDesc tableDesc, JobConf
jobConf) {
if (tableDesc != null && tableDesc.getJobProperties() != null &&
tableDesc.getJobProperties().get(WRITE_KEY) != null) {
jobConf.set("mapred.output.committer.class",
HiveIcebergOutputCommitter.class.getName());
+ String tables = jobConf.get(InputFormatConfig.OUTPUT_TABLES);
+ Map<String, String> outputs =
+ tables == null ? Maps.newHashMap() :
SerializationUtil.deserializeFromBase64(tables);
+ outputs.put((String) tableDesc.getProperties().get(Catalogs.NAME),
+ (String) tableDesc.getProperties().get(Catalogs.LOCATION));
Review comment:
Hive sets them in the `TableDesc`.
I could have used this code too:
```
outputs.put((String)
tableDesc.getProperties().get(hive_metastoreConstants.META_TABLE_NAME),
(String)
tableDesc.getProperties().get(hive_metastoreConstants.META_TABLE_LOCATION));
```
I have used the `Catalogs.NAME`, `Catalogs.LOCATION` because we usually use
them in Iceberg code when we are loading tables, so I thought in Iceberg code
it is easier to understand.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]