use of org.apache.hadoop.hive.ql.parse.repl.load.message.MessageHandler in project hive by apache.
the class ReplicationSemanticAnalyzer method analyzeEventLoad.
private List<Task<? extends Serializable>> analyzeEventLoad(MessageHandler.Context context) throws SemanticException {
MessageHandler messageHandler = context.dmd.getDumpType().handler();
List<Task<? extends Serializable>> tasks = messageHandler.handle(context);
if (context.precursor != null) {
for (Task<? extends Serializable> t : tasks) {
context.precursor.addDependentTask(t);
LOG.debug("Added {}:{} as a precursor of {}:{}", context.precursor.getClass(), context.precursor.getId(), t.getClass(), t.getId());
}
}
inputs.addAll(messageHandler.readEntities());
outputs.addAll(messageHandler.writeEntities());
return addUpdateReplStateTasks(StringUtils.isEmpty(context.tableName), messageHandler.getUpdatedMetadata(), tasks);
}
Aggregations