use of com.airbnb.airpal.api.event.JobFinishedEvent in project airpal by airbnb.
the class ExecutionClient method jobFinished.
protected void jobFinished(Job job) {
job.setQueryFinished(new DateTime());
activeJobsStore.jobFinished(job);
historyStore.addRun(job);
for (Table t : job.getTablesUsed()) {
usageStore.markUsage(t);
}
if (job.getOutput() instanceof HiveTablePersistentOutput && job.getOutput().getLocation() != null) {
String[] parts = job.getOutput().getLocation().toString().split("\\.");
if (parts.length == 2) {
Map<String, List<String>> cache = schemaCache.getSchemaMap("hive");
List<String> tables = cache.get(parts[0]);
tables.add(parts[1]);
}
}
eventBus.post(new JobFinishedEvent(job));
executionMap.remove(job.getUuid());
}
Aggregations