1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.hbase.mapreduce;
20
21 import java.io.IOException;
22
23 import org.apache.commons.logging.Log;
24 import org.apache.commons.logging.LogFactory;
25
26 import org.apache.hadoop.conf.Configuration;
27 import org.apache.hadoop.fs.Path;
28 import org.apache.hadoop.mapred.JobClient;
29 import org.apache.hadoop.mapred.JobConf;
30 import org.apache.hadoop.mapreduce.JobSubmissionFiles;
31 import org.apache.hadoop.hbase.classification.InterfaceAudience;
32 import org.apache.hadoop.hbase.classification.InterfaceStability;
33
34
35
36 @InterfaceAudience.Private
37 @InterfaceStability.Evolving
38 public abstract class JobUtil {
39 private static final Log LOG = LogFactory.getLog(JobUtil.class);
40
41 protected JobUtil() {
42 super();
43 }
44
45
46
47
48
49
50
51
52
53 public static Path getStagingDir(Configuration conf)
54 throws IOException, InterruptedException {
55 JobClient jobClient = new JobClient(new JobConf(conf));
56 return JobSubmissionFiles.getStagingDir(jobClient, conf);
57 }
58 }