if (isLocalJobTracker(job) && isHadoop1()) {
// HCatalog 0.11- do have special class HCatHadoopShims, however this
// class got merged into Hive Shim layer in 0.12+. Following method will
// try to find correct implementation via reflection.
HadoopShims shims = ShimLoader.getHadoopShims();
HCatHadoopShims hcatShims = shims.getHCatShim();
try {
hcatShims.commitJob(new HCatOutputFormat(), job);
} catch (Exception e) {
throw new RuntimeException("Can't explicitly commit job", e);
}
}
}