Search in sources :

Example 6 with WebHCatJTShim

use of org.apache.hadoop.hive.shims.HadoopShims.WebHCatJTShim in project hive by apache.

the class LaunchMapper method killLauncherChildJobs.

/**
 * Kills child jobs of this launcher that have been tagged with this job's ID.
 */
private void killLauncherChildJobs(Configuration conf, String jobId) throws IOException {
    // Extract the launcher job submit/start time and use that to scope down
    // the search interval when we look for child jobs
    long startTime = getTempletonLaunchTime(conf);
    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
    WebHCatJTShim tracker = ShimLoader.getHadoopShims().getWebHCatShim(conf, ugi);
    try {
        tracker.killJobs(jobId, startTime);
    } finally {
        tracker.close();
    }
}
Also used : WebHCatJTShim(org.apache.hadoop.hive.shims.HadoopShims.WebHCatJTShim) UserGroupInformation(org.apache.hadoop.security.UserGroupInformation)

Aggregations

WebHCatJTShim (org.apache.hadoop.hive.shims.HadoopShims.WebHCatJTShim)6 UserGroupInformation (org.apache.hadoop.security.UserGroupInformation)6 IOException (java.io.IOException)3 JobID (org.apache.hadoop.mapred.JobID)2 JobState (org.apache.hive.hcatalog.templeton.tool.JobState)2 ArrayList (java.util.ArrayList)1 Path (org.apache.hadoop.fs.Path)1 HadoopShimsSecure (org.apache.hadoop.hive.shims.HadoopShimsSecure)1 ShimLoader (org.apache.hadoop.hive.shims.ShimLoader)1 JobStatus (org.apache.hadoop.mapred.JobStatus)1