"Start directio task cleanup for datasource: datasource={0} job={1}, task={2}",
id,
taskContext.getJobID(),
taskContext.getTaskAttemptID()));
}
OutputAttemptContext context = HadoopDataSourceUtil.createContext(taskContext, id);
try {
DirectDataSource repo = repository.getRelatedDataSource(containerPath);
repo.cleanupAttemptOutput(context);
} catch (IOException e) {
LOG.error(MessageFormat.format(
"Failed directio task cleanup: datasource={0} (job={1}, task={2})",
id,
taskContext.getJobID(),
taskContext.getTaskAttemptID()), e);
throw e;
} catch (InterruptedException e) {
throw (IOException) new InterruptedIOException(MessageFormat.format(
"Interrupted while cleanup attempt: {0}, {1} (path={2})",
context.getTransactionId(),
context.getAttemptId(),
containerPath)).initCause(e);
}
context.getCounter().add(1);
}
}