use of org.apache.hadoop.hive.ql.parse.repl.load.message.CreateFunctionHandler in project hive by apache.
the class LoadFunction method tasks.
public TaskTracker tasks() throws IOException, SemanticException {
URI fromURI = EximUtil.getValidatedURI(context.hiveConf, stripQuotes(event.rootDir().toUri().toString()));
Path fromPath = new Path(fromURI.getScheme(), fromURI.getAuthority(), fromURI.getPath());
try {
CreateFunctionHandler handler = new CreateFunctionHandler();
List<Task<? extends Serializable>> tasks = handler.handle(new MessageHandler.Context(dbNameToLoadIn, null, fromPath.toString(), null, null, context.hiveConf, context.hiveDb, null, LOG));
createFunctionReplLogTask(tasks, handler.getFunctionName());
tasks.forEach(tracker::addTask);
return tracker;
} catch (Exception e) {
throw new SemanticException(ErrorMsg.INVALID_PATH.getMsg(), e);
}
}
Aggregations