public class Heatmap extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Heatmap.HeatmapData
Internal representation of all data needed to render heatmap;
data-handling code populates this data structure
|
Modifier and Type | Field and Description |
---|---|
protected String |
add_info_extra |
protected String |
cluster |
protected Rectangle2D |
dataBound |
protected prefuse.Display |
dis |
protected Rectangle2D |
labelBottomBound |
protected boolean |
offline_use |
protected HashMap<String,String> |
param_map |
protected boolean |
plot_additional_info |
protected boolean |
plot_legend |
protected HashMap<String,String> |
prettyStateNames |
protected String |
query_stat_type |
protected String |
query_state |
protected javax.servlet.http.HttpServletRequest |
request |
protected boolean |
sort_nodes |
protected String |
table |
protected String |
timezone |
protected prefuse.Visualization |
viz |
protected Rectangle2D |
xlabBound |
protected Rectangle2D |
ylabBound |
Constructor and Description |
---|
Heatmap() |
Heatmap(javax.servlet.http.HttpServletRequest request) |
Heatmap(String timezone,
String cluster,
String event_type,
String query_stat_type,
HashMap<String,String> valmap)
Constructor for Swimlanes visualization object
|
Heatmap(String timezone,
String cluster,
String query_state,
String query_stat_type,
HashMap<String,String> valmap,
int w,
int h) |
Heatmap(String timezone,
String cluster,
String query_state,
String query_stat_type,
HashMap<String,String> valmap,
String shuffles) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAddlInfo(Heatmap.HeatmapData hd) |
protected void |
addHostLabels(Heatmap.HeatmapData hd) |
protected boolean |
checkDone(int[] clustId) |
protected long[][] |
doPermute(long[][] stat,
int[] permute)
Reorder rows (and columns) according to a given ordering
Maintains same ordering along rows and columns
|
Heatmap.HeatmapData |
getData()
Interfaces with database to get data and
populate data structures for rendering
|
boolean |
getImage(OutputStream output,
String img_fmt,
double scale)
Generates image in specified format, and writes image as binary
output to supplied output stream
|
protected int[] |
hClust(long[][] stat)
Sort data for better visualization of patterns
|
protected void |
initPrettyNames() |
void |
run()
Actual code that calls data, generates heatmap, and saves it
|
void |
setDimensions(int width,
int height)
Set dimensions of image to be generated
Call before calling @see #run
|
void |
setLegend(boolean legendopt)
Specify whether to print labels of hosts along axes
Call before calling @see #run
|
protected Heatmap.HeatmapData |
setupDataTable() |
protected void |
setupHeatmap(prefuse.visual.VisualTable vtab,
Heatmap.HeatmapData hd) |
protected void |
setupRenderer() |
protected boolean offline_use
protected javax.servlet.http.HttpServletRequest request
protected String cluster
protected String timezone
protected String query_state
protected String query_stat_type
protected final String table
protected boolean plot_legend
protected boolean sort_nodes
protected boolean plot_additional_info
protected String add_info_extra
protected prefuse.Display dis
protected prefuse.Visualization viz
protected Rectangle2D dataBound
protected Rectangle2D xlabBound
protected Rectangle2D ylabBound
protected Rectangle2D labelBottomBound
public Heatmap()
public Heatmap(String timezone, String cluster, String event_type, String query_stat_type, HashMap<String,String> valmap)
timezone
- Timezone string from environmentcluster
- Cluster name from environmentevent_type
- Whether to display shuffles or notquery_stat_type
- valmap
- HashMap of key/value pairs simulating parameters from a HttpRequestpublic Heatmap(String timezone, String cluster, String query_state, String query_stat_type, HashMap<String,String> valmap, String shuffles)
public Heatmap(String timezone, String cluster, String query_state, String query_stat_type, HashMap<String,String> valmap, int w, int h)
public Heatmap(javax.servlet.http.HttpServletRequest request)
public void setDimensions(int width, int height)
width
- height
- public void setLegend(boolean legendopt)
legendopt
- public boolean getImage(OutputStream output, String img_fmt, double scale)
output
- img_fmt
- scale
- protected void setupRenderer()
protected Heatmap.HeatmapData setupDataTable()
protected void setupHeatmap(prefuse.visual.VisualTable vtab, Heatmap.HeatmapData hd)
protected void addHostLabels(Heatmap.HeatmapData hd)
protected void addAddlInfo(Heatmap.HeatmapData hd)
protected void initPrettyNames()
public void run()
protected boolean checkDone(int[] clustId)
protected int[] hClust(long[][] stat)
protected long[][] doPermute(long[][] stat, int[] permute)
public Heatmap.HeatmapData getData()
Copyright © 2015 Apache Software Foundation. All Rights Reserved.