public class Gridmix extends Configured implements Tool
Modifier and Type | Field and Description |
---|---|
static String |
GRIDMIX_JOBMONITOR_SLEEPTIME_MILLIS
The configuration key which determines the duration for which the
job-monitor sleeps while polling for job status.
|
static int |
GRIDMIX_JOBMONITOR_SLEEPTIME_MILLIS_DEFAULT
Default value for
GRIDMIX_JOBMONITOR_SLEEPTIME_MILLIS . |
static String |
GRIDMIX_JOBMONITOR_THREADS
The configuration key which determines the total number of job-status
monitoring threads.
|
static int |
GRIDMIX_JOBMONITOR_THREADS_DEFAULT
Default value for
GRIDMIX_JOBMONITOR_THREADS . |
static String |
GRIDMIX_OUT_DIR
Output (scratch) directory for submitted jobs.
|
static String |
GRIDMIX_QUE_DEP
The depth of the queue of job descriptions.
|
static String |
GRIDMIX_SUB_MUL
Multiplier to accelerate or decelerate job submission.
|
static String |
GRIDMIX_SUB_THR
Number of submitting threads at the client and upper bound for
in-memory split data.
|
static String |
GRIDMIX_USR_RSV
Class used to resolve users in the trace to the list of target users
on the cluster.
|
static org.apache.commons.logging.Log |
LOG |
static String |
ORIGINAL_JOB_ID
Configuration property set in simulated job's configuration whose value is
set to the corresponding original job's id.
|
static String |
ORIGINAL_JOB_NAME
Configuration property set in simulated job's configuration whose value is
set to the corresponding original job's name.
|
Constructor and Description |
---|
Gridmix() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.hadoop.mapred.gridmix.JobFactory |
createJobFactory(org.apache.hadoop.mapred.gridmix.JobSubmitter submitter,
String traceIn,
Path scratchDir,
Configuration conf,
CountDownLatch startFlag,
UserResolver resolver) |
protected org.apache.hadoop.mapred.gridmix.JobMonitor |
createJobMonitor(Statistics stats,
Configuration conf) |
protected JobStoryProducer |
createJobStoryProducer(String traceIn,
Configuration conf)
Create an appropriate
JobStoryProducer object for the
given trace. |
protected org.apache.hadoop.mapred.gridmix.JobSubmitter |
createJobSubmitter(org.apache.hadoop.mapred.gridmix.JobMonitor monitor,
int threads,
int queueDepth,
org.apache.hadoop.mapred.gridmix.FilePool pool,
UserResolver resolver,
Statistics statistics) |
UserResolver |
getCurrentUserResolver() |
protected static org.apache.hadoop.mapred.gridmix.GridmixJobSubmissionPolicy |
getJobSubmissionPolicy(Configuration conf) |
protected org.apache.hadoop.mapred.gridmix.Summarizer |
getSummarizer() |
static void |
main(String[] argv) |
protected void |
printUsage(PrintStream out) |
int |
run(String[] argv)
Execute the command with the given arguments.
|
protected void |
writeDistCacheData(Configuration conf)
Write random bytes in the distributed cache files that will be used by all
simulated jobs of current gridmix run, if files are to be generated.
|
protected int |
writeInputData(long genbytes,
Path inputDir)
Write random bytes at the path <inputDir> if needed.
|
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf, setConf
public static final org.apache.commons.logging.Log LOG
public static final String GRIDMIX_OUT_DIR
public static final String GRIDMIX_SUB_THR
public static final String GRIDMIX_QUE_DEP
public static final String GRIDMIX_SUB_MUL
public static final String GRIDMIX_USR_RSV
public static final String GRIDMIX_JOBMONITOR_SLEEPTIME_MILLIS
public static final int GRIDMIX_JOBMONITOR_SLEEPTIME_MILLIS_DEFAULT
GRIDMIX_JOBMONITOR_SLEEPTIME_MILLIS
.public static final String GRIDMIX_JOBMONITOR_THREADS
public static final int GRIDMIX_JOBMONITOR_THREADS_DEFAULT
GRIDMIX_JOBMONITOR_THREADS
.public static final String ORIGINAL_JOB_NAME
public static final String ORIGINAL_JOB_ID
protected int writeInputData(long genbytes, Path inputDir) throws IOException, InterruptedException
IOException
InterruptedException
GenerateData
protected void writeDistCacheData(Configuration conf) throws IOException, InterruptedException
GenerateDistCacheData.JOB_NAME
IOException
InterruptedException
GenerateDistCacheData
protected JobStoryProducer createJobStoryProducer(String traceIn, Configuration conf) throws IOException
JobStoryProducer
object for the
given trace.traceIn
- the path to the trace file. The special path
"-" denotes the standard input stream.conf
- the configuration to be used.IOException
- if there was an error.protected static org.apache.hadoop.mapred.gridmix.GridmixJobSubmissionPolicy getJobSubmissionPolicy(Configuration conf)
protected org.apache.hadoop.mapred.gridmix.JobMonitor createJobMonitor(Statistics stats, Configuration conf) throws IOException
IOException
protected org.apache.hadoop.mapred.gridmix.JobSubmitter createJobSubmitter(org.apache.hadoop.mapred.gridmix.JobMonitor monitor, int threads, int queueDepth, org.apache.hadoop.mapred.gridmix.FilePool pool, UserResolver resolver, Statistics statistics) throws IOException
IOException
protected org.apache.hadoop.mapred.gridmix.JobFactory createJobFactory(org.apache.hadoop.mapred.gridmix.JobSubmitter submitter, String traceIn, Path scratchDir, Configuration conf, CountDownLatch startFlag, UserResolver resolver) throws IOException
IOException
public UserResolver getCurrentUserResolver()
public int run(String[] argv) throws IOException, InterruptedException
Tool
run
in interface Tool
argv
- command specific arguments.IOException
InterruptedException
protected void printUsage(PrintStream out)
protected org.apache.hadoop.mapred.gridmix.Summarizer getSummarizer()
Copyright © 2013 Apache Software Foundation. All rights reserved.