public class Swimlanes extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Swimlanes.CoordScaler
Provides convenient rescaling of raw values to be plotted to
actual pixels for plotting on image
|
protected class |
Swimlanes.MapReduceSwimlanes
Modifier for generic Swimlanes plots to plot shuffle, sort, and reducer
states of same reduce on same line
|
static class |
Swimlanes.SwimlanesStateAction
Prefuse action for plotting a line for each state
|
static class |
Swimlanes.SwimlanesStatePalette
Provide constant mapping between state names and colours
so that even if particular states are missing, the colours are fixed
for each state
|
Modifier and Type | Field and Description |
---|---|
protected String |
abc |
protected String |
cluster |
protected Rectangle2D |
dataBound |
protected prefuse.Display |
dis |
protected String |
jobname |
protected Rectangle2D |
labelBottomBound |
protected boolean |
offline_use |
protected HashMap<String,String> |
param_map |
protected boolean |
plot_legend |
protected javax.servlet.http.HttpServletRequest |
request |
protected String |
shuffle_option |
protected String |
table |
protected String |
timezone |
protected prefuse.Visualization |
viz |
protected Rectangle2D |
xlabBound |
protected Rectangle2D |
ylabBound |
Constructor and Description |
---|
Swimlanes() |
Swimlanes(javax.servlet.http.HttpServletRequest request) |
Swimlanes(String timezone,
String cluster,
String event_type,
HashMap<String,String> valmap) |
Swimlanes(String timezone,
String cluster,
String event_type,
HashMap<String,String> valmap,
int width,
int height) |
Swimlanes(String timezone,
String cluster,
String event_type,
HashMap<String,String> valmap,
int width,
int height,
String legend_opt) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAxisNames() |
protected void |
addLegend() |
protected prefuse.data.Table |
addTimeCol(prefuse.data.Table origTable,
String srcFieldName,
String srcMillisecondFieldName,
String dstFieldName)
Adds a column to given table by converting timestamp to long with
seconds since epoch, and adding milliseconds from additional column
in original table
|
protected prefuse.data.Table |
addTimeOffsetCol(prefuse.data.Table origTable,
String srcFieldName,
String srcMillisecondFieldName,
String dstFieldName,
long timeOffset)
Adds a column with number of seconds of timestamp elapsed since lowest
start time; allows times to be plotted as a delta of the start time
|
prefuse.data.Table |
getData() |
boolean |
getImage(OutputStream output,
String img_fmt,
double scale)
Generates image in specified format, and writes image as binary
output to supplied output stream
|
void |
run() |
void |
setDimensions(int width,
int height)
Set dimensions of image to be generated
Call before calling @see #run
|
void |
setJobName(String s)
Set job ID to filter results on
Call before calling @see #run
|
void |
setLegend(boolean legendopt)
Specify whether to print legend of states
Advisable to not print legend for excessively small images since
legend has fixed point size
Call before calling @see #run
|
protected prefuse.data.Table |
setupDataTable() |
protected void |
setupRenderer() |
protected boolean offline_use
protected javax.servlet.http.HttpServletRequest request
protected String abc
protected String cluster
protected String timezone
protected String shuffle_option
protected final String table
protected boolean plot_legend
protected String jobname
protected prefuse.Display dis
protected prefuse.Visualization viz
protected Rectangle2D dataBound
protected Rectangle2D xlabBound
protected Rectangle2D ylabBound
protected Rectangle2D labelBottomBound
public Swimlanes()
public Swimlanes(String timezone, String cluster, String event_type, HashMap<String,String> valmap)
timezone
- Timezone string from environmentcluster
- Cluster name from environmentevent_type
- Whether to display shuffles or notvalmap
- HashMap of key/value pairs simulating parameters from a HttpRequestpublic Swimlanes(String timezone, String cluster, String event_type, HashMap<String,String> valmap, int width, int height)
public Swimlanes(String timezone, String cluster, String event_type, HashMap<String,String> valmap, int width, int height, String legend_opt)
public Swimlanes(javax.servlet.http.HttpServletRequest request)
public void setJobName(String s)
public void setDimensions(int width, int height)
public void setLegend(boolean legendopt)
public boolean getImage(OutputStream output, String img_fmt, double scale)
protected prefuse.data.Table addTimeCol(prefuse.data.Table origTable, String srcFieldName, String srcMillisecondFieldName, String dstFieldName)
origTable
- Table to add tosrcFieldName
- Name of column containing timestampsrcMillisecondFieldName
- Name of column containing millisecond value of timedstFieldName
- Name of new column to addprotected prefuse.data.Table addTimeOffsetCol(prefuse.data.Table origTable, String srcFieldName, String srcMillisecondFieldName, String dstFieldName, long timeOffset)
origTable
- Table to add column tosrcFieldName
- Name of column containing timestampsrcMillisecondFieldName
- Name of column containing millisecond value of timedstFieldName
- Name of new column to addprotected void setupRenderer()
protected prefuse.data.Table setupDataTable()
protected void addAxisNames()
protected void addLegend()
public void run()
public prefuse.data.Table getData()
Copyright © ${year} The Apache Software Foundation