public class SerialJobFactory extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
JobFactory.FilterJobStory |
Modifier and Type | Field and Description |
---|---|
protected Configuration |
conf |
protected IOException |
error |
protected JobCreator |
jobCreator |
protected JobStoryProducer |
jobProducer |
protected ReentrantLock |
lock |
static org.apache.commons.logging.Log |
LOG |
protected int |
numJobsInTrace |
protected float |
rateFactor |
protected Thread |
rThread |
protected Path |
scratch |
protected AtomicInteger |
sequence |
protected CountDownLatch |
startFlag |
protected org.apache.hadoop.mapred.gridmix.JobSubmitter |
submitter |
protected UserResolver |
userResolver |
Constructor and Description |
---|
SerialJobFactory(org.apache.hadoop.mapred.gridmix.JobSubmitter submitter,
JobStoryProducer jobProducer,
Path scratch,
Configuration conf,
CountDownLatch startFlag,
UserResolver resolver)
Creating a new instance does not start the thread.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Interrupt the reader thread.
|
void |
add(Void ignored)
Add is disabled.
|
Thread |
createReaderThread() |
IOException |
error()
Obtain the error that caused the thread to exit unexpectedly.
|
protected JobStory |
getNextJobFiltered() |
void |
join(long millis)
Wait for the reader thread to exhaust the job trace.
|
void |
shutdown()
Interrupt the reader thread.
|
void |
start()
Start the reader thread, wait for latch if necessary.
|
void |
update(org.apache.hadoop.mapred.gridmix.Statistics.JobStats item)
SERIAL.
|
public static final org.apache.commons.logging.Log LOG
protected final Path scratch
protected final float rateFactor
protected final Configuration conf
protected final Thread rThread
protected final AtomicInteger sequence
protected final org.apache.hadoop.mapred.gridmix.JobSubmitter submitter
protected final CountDownLatch startFlag
protected final UserResolver userResolver
protected final JobCreator jobCreator
protected volatile IOException error
protected final JobStoryProducer jobProducer
protected final ReentrantLock lock
protected int numJobsInTrace
public SerialJobFactory(org.apache.hadoop.mapred.gridmix.JobSubmitter submitter, JobStoryProducer jobProducer, Path scratch, Configuration conf, CountDownLatch startFlag, UserResolver resolver) throws IOException
submitter
- Component to which deserialized jobs are passedjobProducer
- Job story producer
ZombieJobProducer
scratch
- Directory into which to write output from simulated jobsconf
- Config passed to all jobs to be submittedstartFlag
- Latch released from main to start pipelineIOException
public Thread createReaderThread()
public void update(org.apache.hadoop.mapred.gridmix.Statistics.JobStats item)
item
- public void start()
protected JobStory getNextJobFiltered() throws IOException
IOException
public IOException error()
public void add(Void ignored)
UnsupportedOperationException
public void join(long millis) throws InterruptedException
InterruptedException
public void shutdown()
public void abort()
Copyright © 2013 Apache Software Foundation. All rights reserved.