public final class GoogleTaskUsageTraceReader extends TraceReaderBase
Cloudlet
s.
The trace files are the ones inside the task_usage sub-directory of downloaded Google traces.
The instructions to download the traces are provided in the link above.
A spreadsheet that makes it easier to understand the structure of trace files is provided in docs/google-cluster-data-samples.xlsx
The documentation for fields and values were obtained from the Google Cluster trace documentation in the link above. It's strongly recommended to read such a documentation before trying to use this class.
Check important details at TraceReaderAbstract
.
process()
Modifier and Type | Class and Description |
---|---|
static class |
GoogleTaskUsageTraceReader.FieldIndex
The index of each field in the trace file.
|
Constructor and Description |
---|
GoogleTaskUsageTraceReader(List<DatacenterBroker> brokers,
String filePath)
Instantiates a
GoogleTaskUsageTraceReader to read a "task usage" trace file. |
Modifier and Type | Method and Description |
---|---|
static GoogleTaskUsageTraceReader |
getInstance(List<DatacenterBroker> brokers,
String filePath)
Gets a
GoogleTaskUsageTraceReader instance to read a "task usage" trace file
inside the application's resource directory. |
protected void |
postProcess()
Executes any post-process after the trace file was totally parsed.
|
protected void |
preProcess()
There is not pre-process for this implementation.
|
Set<Cloudlet> |
process()
Process the
trace file request to change the resource usage of Cloudlet s
as described in the file. |
protected boolean |
processParsedLineInternal()
Process the last parsed trace line.
|
getFieldDoubleValue, getFieldDoubleValue, getFieldIntValue, getFieldIntValue, getFieldLongValue, getFieldLongValue, getFieldValue, getLastParsedLineArray, setLastParsedLineArray
getCommentString, getFieldDelimiterRegex, getFilePath, getInputStream, getLastLineNumber, getMaxLinesToRead, parseTraceLine, readFile, readGZIPFile, readTextFile, readZipFile, setCommentString, setFieldDelimiterRegex, setMaxLinesToRead
public GoogleTaskUsageTraceReader(List<DatacenterBroker> brokers, String filePath) throws IOException
GoogleTaskUsageTraceReader
to read a "task usage" trace file.brokers
- a list of DatacenterBroker
s that own running Cloudlets for which
resource usage will be read from the trace.filePath
- the workload trace relative file name in one of the following formats: ASCII text, zip, gz.IllegalArgumentException
- when the trace file name is null or emptyUncheckedIOException
- when the file cannot be accessed (such as when it doesn't exist)IOException
process()
public static GoogleTaskUsageTraceReader getInstance(List<DatacenterBroker> brokers, String filePath)
GoogleTaskUsageTraceReader
instance to read a "task usage" trace file
inside the application's resource directory.brokers
- a list of DatacenterBroker
s that own running Cloudlets for which
resource usage will be read from the trace.filePath
- the workload trace relative file name in one of the following formats: ASCII text, zip, gz.IllegalArgumentException
- when the trace file name is null or emptyUncheckedIOException
- when the file cannot be accessed (such as when it doesn't exist)process()
public Set<Cloudlet> process()
trace file
request to change the resource usage of Cloudlet
s
as described in the file. It returns the List of all processed Cloudlet
s.
If the Cloudlets created by a GoogleTaskEventsTraceReader
use a UtilizationModelFull
to define that the CPUs required
by the Cloudlets will be used 100%,
when the "task usage" file is read, a different CPU usage can be set.
In regular simulations, if this value is smaller,
a Cloudlet will spend more time to finish.
However, since the "task events" file defines the exact time to finish
each Cloudlet, using less than 100% won't make the Cloudlet to finish
earlier (as in simulations not using the Google Cluster Data).
Each Cloudlet will just have a smaller length at the end of the simulation.
These trace files don't define the length of the Cloudlet (task).
This way, the Cloudlets are created with an indefinite length
(see Cloudlet.setLength(long)
) and the length is increased
as the Cloudlet is executed. Therefore, if the Cloudlet is using
a higher percentage of the CPU capacity, it will execute
more instructions in a given time interval.
If it's using a lower percentage of the CPU capacity, it will execute
less instructions in that interval.
In conclusion, the exec and finish time of Cloudlets created from Google Cluster trace files won't change according to the percentage of CPU the Cloudlets are using.
Cloudlet
s processed according to a line in the trace fileprotected void preProcess()
protected void postProcess()
protected boolean processParsedLineInternal()
processParsedLine(String[])
,
TraceReaderBase.getLastParsedLineArray()
Copyright © 2015–2019 Systems, Security and Image Communication Lab - Instituto de Telecomunica����es (IT) - Universidade da Beira Interior (UBI) - Instituto Federal de Educa����o Ci��ncia e Tecnologia do Tocantins (IFTO). All rights reserved.