Source:
public void handle(Context withinContext) throws Exception { LOG.info("Processing#{} ALTER_TABLE message : {}", fromEventId(), eventMessageAsJSON); Table qlMdTableBefore = new Table(before); if (Scenario.RENAME == scenario) { withinContext.tablesForBootstrap.remove(before.getTableName()); } if (!Utils .shouldReplicate(withinContext.replicationSpec, qlMdTableBefore, true, withinContext.tablesForBootstrap, withinContext.oldReplScope, withinContext.hiveConf)) { return; } if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)) { if (!AcidUtils.isTransactionalTable(before) && AcidUtils.isTransactionalTable(after)) { LOG.info("The table " + after.getTableName() + " is converted to ACID table." + " It will be replicated with bootstrap load as hive.repl.bootstrap.acid.tables is set to true."); return; } } if (withinContext.replScope != null && !withinContext.replScope.includeAllTables()) { if (!handleRenameDuringTableLevelReplication(withinContext)) { LOG.info("Alter event for table " + before.getTableName() + " is skipped from dumping"); return; } } if (Scenario.ALTER == scenario) { withinContext.replicationSpec.setIsMetadataOnly(true); Table qlMdTableAfter = new Table(after); Path metaDataPath = new Path(withinContext.eventRoot, EximUtil.METADATA_NAME); if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY)) { qlMdTableAfter.setStatsStateLikeNewTable(); } EximUtil.createExportDump( metaDataPath.getFileSystem(withinContext.hiveConf), metaDataPath, qlMdTableAfter, null, withinContext.replicationSpec, withinContext.hiveConf); } DumpMetaData dmd = withinContext.createDmd(this); dmd.setPayload(eventMessageAsJSON); dmd.write(); }

Target:
public void handle(Context withinContext) throws Exception { LOG.info("Processing#{} ALTER_TABLE message : {}", fromEventId(), eventMessageAsJSON); Table qlMdTableBefore = new Table(before); Set<String> bootstrapTableList; if (Scenario.RENAME == scenario) { bootstrapTableList = null; } else { bootstrapTableList = withinContext.getTablesForBootstrap(); } if (!Utils .shouldReplicate(withinContext.replicationSpec, qlMdTableBefore, true, bootstrapTableList, withinContext.oldReplScope, withinContext.hiveConf)) { return; } if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES)) { if (!AcidUtils.isTransactionalTable(before) && AcidUtils.isTransactionalTable(after)) { LOG.info("The table " + after.getTableName() + " is converted to ACID table." + " It will be replicated with bootstrap load as hive.repl.bootstrap.acid.tables is set to true."); return; } } if (!withinContext.replScope.includeAllTables()) { if (!handleForTableLevelReplication(withinContext)) { LOG.info("Alter event for table " + before.getTableName() + " is skipped from dumping"); return; } } if (Scenario.ALTER == scenario) { withinContext.replicationSpec.setIsMetadataOnly(true); Table qlMdTableAfter = new Table(after); Path metaDataPath = new Path(withinContext.eventRoot, EximUtil.METADATA_NAME); if (withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY)) { qlMdTableAfter.setStatsStateLikeNewTable(); } EximUtil.createExportDump( metaDataPath.getFileSystem(withinContext.hiveConf), metaDataPath, qlMdTableAfter, null, withinContext.replicationSpec, withinContext.hiveConf); } DumpMetaData dmd = withinContext.createDmd(this); dmd.setPayload(eventMessageAsJSON); dmd.write(); }