[ https://issues.apache.org/jira/browse/HIVE-25057?focusedWorklogId=589173&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-589173 ]
ASF GitHub Bot logged work on HIVE-25057: ----------------------------------------- Author: ASF GitHub Bot Created on: 26/Apr/21 12:35 Start Date: 26/Apr/21 12:35 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #2219: URL: https://github.com/apache/hive/pull/2219#discussion_r620253478 ########## File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java ########## @@ -254,6 +262,32 @@ public void commitAlterTable(org.apache.hadoop.hive.metastore.api.Table hmsTable } } + @Override + public void rollbackAlterTable(org.apache.hadoop.hive.metastore.api.Table hmsTable, EnvironmentContext context) + throws MetaException { + context.getProperties().put(INITIALIZE_ROLLBACK_ALTER, "true"); + this.catalogProperties = getCatalogProperties(hmsTable); + try { + this.icebergTable = Catalogs.loadTable(conf, catalogProperties); + } catch (NoSuchTableException nte) { + // iceberg table was not yet created, no need to delete the metadata dir separately + return; + } + // we want to keep the data files but get rid of the metadata directory + hmsTable.getParameters().put(InputFormatConfig.EXTERNAL_TABLE_PURGE, "FALSE"); Review comment: Will this change actually be saved into the HMS db? If so, what if the original table had this property as true? Should we change it silently here due to the rollback? -- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 589173) Time Spent: 1h 40m (was: 1.5h) > Implement rollback for hive to iceberg migration > ------------------------------------------------ > > Key: HIVE-25057 > URL: https://issues.apache.org/jira/browse/HIVE-25057 > Project: Hive > Issue Type: Improvement > Reporter: László Pintér > Assignee: László Pintér > Priority: Major > Labels: pull-request-available > Time Spent: 1h 40m > Remaining Estimate: 0h > > This is a follow-up Jira of HIVE-25008. > In case of an error during hive to iceberg migration, the original hive table > must be restored. -- This message was sent by Atlassian Jira (v8.3.4#803005)