@Override
  public List<Task<?>> handle(Context context)
      throws SemanticException {
    if (!AcidUtils.isAcidEnabled(context.hiveConf)) {
      context.log.error("Cannot load transaction events as acid is not enabled");
      throw new SemanticException("Cannot load transaction events as acid is not enabled");
    }

    AbortTxnMessage msg = deserializer.getAbortTxnMessage(context.dmd.getPayload());

    Task<ReplTxnWork> abortTxnTask = TaskFactory.get(
        new ReplTxnWork(HiveUtils.getReplPolicy(context.dbName), context.dbName, null,
                msg.getTxnId(), ReplTxnWork.OperationType.REPL_ABORT_TXN, context.eventOnlyReplicationSpec(),
                context.getDumpDirectory(), context.getMetricCollector()),
        context.hiveConf
    );

    // For warehouse level dump, don't update the metadata of database as we don't know this txn is for which database.
    // Anyways, if this event gets executed again, it is taken care of.
    if (!context.isDbNameEmpty()) {
      updatedMetadata.set(context.dmd.getEventTo().toString(), context.dbName, null, null);
    }
    context.log.debug("Added Abort txn task : {}", abortTxnTask.getId());
    return Collections.singletonList(abortTxnTask);
  }
AbortTxnHandler
Target(Load) side handler for abort transaction event.
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/AbortTxnHandler.java