|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.chukwa.analysis.salsa.visualization.Heatmap
public class Heatmap
Static image rendering for heatmap visualization of spatial HDFS activity patterns for scalable rendering on front-end (web-browser) Handles database data retrieval, transforming data to form for visualization elements, and initializing and calling visualization elements
Nested Class Summary | |
---|---|
protected static class |
Heatmap.HeatmapData
Internal representation of all data needed to render heatmap; data-handling code populates this data structure |
Field Summary | |
---|---|
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 Summary | |
---|---|
Heatmap()
|
|
Heatmap(javax.servlet.http.HttpServletRequest request)
|
|
Heatmap(String timezone,
String cluster,
String event_type,
String query_stat_type,
HashMap<String,String> valmap)
|
|
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)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean offline_use
protected javax.servlet.http.HttpServletRequest request
protected HashMap<String,String> param_map
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
protected HashMap<String,String> prettyStateNames
Constructor Detail |
---|
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 notvalmap
- 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)
Method Detail |
---|
public void setDimensions(int width, int height)
public void setLegend(boolean legendopt)
public boolean getImage(OutputStream output, String img_fmt, double 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |