|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.counters.query.PivotTable
public class PivotTable
Aggregates data from a table by grouping the cells in the table into sets (CSets)
of category columns. The values for cells belonging to the same
CSet are aggregated for each distinct
ICounterNode.getName().
| Field Summary | |
|---|---|
ICounter[] |
a
The selected counters (redundant reference to HistoryTable.a. |
String[] |
cnames
An array of category column names. |
List<CSet> |
csets
Aggregation of the selected counters ( a) into sets sharing
the same category values. |
HistoryTable |
src
The HistoryTable (converts counter hierarchy into regular table). |
LinkedHashSet<String> |
vcols
The ordered set of distinct counter names. |
| Constructor Summary | |
|---|---|
PivotTable(Pattern pattern,
String[] category,
HistoryTable t)
|
|
| Method Summary | |
|---|---|
protected static List<CSet> |
getCategoryValueSets(Pattern pattern,
ICounter[] a,
AtomicInteger ngroups)
The set of distinct ordered matched sets of category values in the current row of the history table paired with the ICounters
matched up on those category values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final HistoryTable src
public final ICounter[] a
HistoryTable.a.
public final LinkedHashSet<String> vcols
public final List<CSet> csets
a) into sets sharing
the same category values.
public final String[] cnames
URLQueryModel.CATEGORY| Constructor Detail |
|---|
public PivotTable(Pattern pattern,
String[] category,
HistoryTable t)
pattern - The pattern used to specify the counters of interest and the
capturing groups which determined how the counters will be
aggregated.
If a capturing group is used for the counter name then that
capturing group will be ignored. This makes it easier switch
back and forth between a PivotTable and a
HistoryTable. If the counter name was in fact treated
as a capturing group for the purposes of determining the
category columns, then that would give you a distinct row for
every sample and blanks in the other value columns.
category - The ordered labels to be assigned to the category columns
(optional). When given, the order of the category names
parameters MUST correspond with the order of the capturing
groups in the pattern.t - The source data.| Method Detail |
|---|
protected static List<CSet> getCategoryValueSets(Pattern pattern,
ICounter[] a,
AtomicInteger ngroups)
ICounters
matched up on those category values.
Note: This automatically detects if the last capturing group captures the counter name and then drop that from the set of category columns. This makes it much easier to switch between a correlated view and a pivot view since you often want the counter name to be a capturing group for the correlated view.
ngroups - The #of capturing groups which were actually used (by
side-effect). This is either the #of capturing groups which
were specified in the pattern -or- one less than that
value iff the last capturing group captures the counter name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||