public class JobLocalizer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
JOB_LOCAL_CTXT |
protected JobConf |
ttConf |
| Constructor and Description |
|---|
JobLocalizer(JobConf ttConf,
String user,
String jobid) |
JobLocalizer(JobConf ttConf,
String user,
String jobid,
String... localDirs) |
| Modifier and Type | Method and Description |
|---|---|
void |
createJobDirs()
Prepare the job directories for a given job.
|
void |
createLocalDirs() |
void |
createUserDirs()
Initialize the local directories for a particular user on this TT.
|
void |
createWorkDir(JobConf jConf) |
static long[] |
downloadPrivateCache(org.apache.hadoop.conf.Configuration conf)
Download the parts of the distributed cache that are private.
|
org.apache.hadoop.fs.Path |
findCredentials() |
void |
initializeJobLogDir()
Create job log directory and set appropriate permissions for the directory.
|
void |
localizeJobFiles(JobID jobid,
JobConf jConf,
org.apache.hadoop.fs.Path localJobFile,
org.apache.hadoop.fs.Path localJobTokenFile,
TaskUmbilicalProtocol taskTracker) |
void |
localizeJobFiles(JobID jobid,
JobConf jConf,
org.apache.hadoop.fs.Path localJobTokenFile,
TaskUmbilicalProtocol taskTracker) |
static void |
main(String[] argv) |
int |
runSetup(String user,
String jobid,
org.apache.hadoop.fs.Path localJobTokenFile,
TaskUmbilicalProtocol taskTracker) |
static void |
writeLocalJobFile(org.apache.hadoop.fs.Path jobFile,
JobConf conf)
Write the task specific job-configuration file.
|
protected final JobConf ttConf
protected static final String JOB_LOCAL_CTXT
public JobLocalizer(JobConf ttConf, String user, String jobid) throws IOException
IOExceptionpublic JobLocalizer(JobConf ttConf, String user, String jobid, String... localDirs) throws IOException
IOExceptionpublic void createLocalDirs()
throws IOException
IOExceptionpublic void createUserDirs()
throws IOException
IOExceptionpublic void createJobDirs()
throws IOException
TaskController.initializeJob(java.lang.String, java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, org.apache.hadoop.mapred.TaskUmbilicalProtocol, java.net.InetSocketAddress) is run at a
later time to set proper private permissions on the job directories. IOExceptionpublic void initializeJobLogDir()
throws IOException
IOExceptionpublic static long[] downloadPrivateCache(org.apache.hadoop.conf.Configuration conf)
throws IOException
conf - the job's configurationIOExceptionpublic void localizeJobFiles(JobID jobid, JobConf jConf, org.apache.hadoop.fs.Path localJobTokenFile, TaskUmbilicalProtocol taskTracker) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void localizeJobFiles(JobID jobid, JobConf jConf, org.apache.hadoop.fs.Path localJobFile, org.apache.hadoop.fs.Path localJobTokenFile, TaskUmbilicalProtocol taskTracker) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void createWorkDir(JobConf jConf) throws IOException
IOExceptionpublic org.apache.hadoop.fs.Path findCredentials()
throws IOException
IOExceptionpublic int runSetup(String user, String jobid, org.apache.hadoop.fs.Path localJobTokenFile, TaskUmbilicalProtocol taskTracker) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void main(String[] argv) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void writeLocalJobFile(org.apache.hadoop.fs.Path jobFile,
JobConf conf)
throws IOException
IOExceptionCopyright © 2009 The Apache Software Foundation