Search in sources :

Example 1 with MessageHandler

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);
}
Also used : Task(org.apache.hadoop.hive.ql.exec.Task) Serializable(java.io.Serializable) MessageHandler(org.apache.hadoop.hive.ql.parse.repl.load.message.MessageHandler)

Aggregations

Serializable (java.io.Serializable)1 Task (org.apache.hadoop.hive.ql.exec.Task)1 MessageHandler (org.apache.hadoop.hive.ql.parse.repl.load.message.MessageHandler)1