Aggarwal-Raghav commented on code in PR #6273:
URL: https://github.com/apache/hive/pull/6273#discussion_r2709082888
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -2282,6 +2286,24 @@ public boolean supportsDefaultColumnValues(Map<String,
String> tblProps) {
return IcebergTableUtil.formatVersion(tblProps) >= 3;
}
+ @Override
+ public MsckResult repair(org.apache.hadoop.hive.ql.metadata.Table hmsTable,
HiveConf conf, MsckDesc desc)
+ throws HiveException {
+ LOG.info("Starting Iceberg table repair{} for {}", desc.isRepair() ? "" :
" (dry-run)",
+ hmsTable.getFullyQualifiedName());
+ Table table = IcebergTableUtil.getTable(conf, hmsTable.getTTable());
+
+ HiveIcebergRepairTable repair = new HiveIcebergRepairTable(table, desc);
+ try {
+ return repair.execute();
+ } catch (Exception e) {
+ String errorMsg = String.format("Failed to repair Iceberg table %s: %s",
+ hmsTable.getFullyQualifiedName(), e.getMessage());
+ LOG.error(errorMsg, e);
Review Comment:
I think we can get rid of LOG as we are anyway throwing same errorMsg?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]