Modifier and Type | Class and Description |
---|---|
protected static class |
PivotNode.PivotBranch.PivotDataPair<T>
Contains pivot data for
PivotNode.PivotBranch classes. |
PivotNode.PivotBranch<T>, PivotNode.PivotLeaf
SortableFacet.FacetBucket, SortableFacet.FacetSortSpecification
currentPivot
sort
collectionManager, expressionCalculator, name, reductionData
Constructor and Description |
---|
PivotBranch(String name,
StringValueStream expression,
PivotNode<T> childPivot) |
Modifier and Type | Method and Description |
---|---|
void |
accept(String pivotValue) |
protected void |
exportPivotValue(DataOutput output,
PivotNode.PivotBranch.PivotDataPair<T> pivotData)
Export the given pivot data, containing
ReductionData and pivot children if they exist. |
Iterable<Map<String,Object>> |
getPivotedResponse(Map<String,PivotNode.PivotBranch.PivotDataPair<T>> pivot)
Create the response of the facet to be returned in the overall analytics response.
|
protected void |
importPivotValue(DataInput input,
String pivotValue)
Import the next pivot value's set of
ReductionData and children's ReductionData if they exist. |
void |
setExpressionCalculator(ExpressionCalculator expressionCalculator)
Set the
ExpressionCalculator that calculates the collection of the expressions
requested for this facet. |
void |
setReductionCollectionManager(ReductionCollectionManager collectionManager)
Set the
ReductionCollectionManager that manages the collection of the expressions
calculated with this facet. |
addFacetValueCollectionTargets, exportPivot, importPivot
applyOptions, createOldResponse, createResponse, getSort, setSort
exportFacetValue, exportShardData, getName, importFacetValue, importShardData
public PivotBranch(String name, StringValueStream expression, PivotNode<T> childPivot)
public void setReductionCollectionManager(ReductionCollectionManager collectionManager)
AnalyticsFacet
ReductionCollectionManager
that manages the collection of the expressions
calculated with this facet.setReductionCollectionManager
in class AnalyticsFacet
collectionManager
- The manager for relevant expressionspublic void setExpressionCalculator(ExpressionCalculator expressionCalculator)
AnalyticsFacet
ExpressionCalculator
that calculates the collection of the expressions
requested for this facet.setExpressionCalculator
in class AnalyticsFacet
expressionCalculator
- The calculator for relevant expressionspublic void accept(String pivotValue)
protected void importPivotValue(DataInput input, String pivotValue) throws IOException
PivotNode
ReductionData
and children's ReductionData
if they exist.importPivotValue
in class PivotNode<PivotNode.PivotBranch.PivotDataPair<T>>
input
- the bit-stream to import the reduction data frompivotValue
- the next pivot valueIOException
- if an exception occurs while reading from the inputprotected void exportPivotValue(DataOutput output, PivotNode.PivotBranch.PivotDataPair<T> pivotData) throws IOException
PivotNode
ReductionData
and pivot children if they exist.exportPivotValue
in class PivotNode<PivotNode.PivotBranch.PivotDataPair<T>>
output
- the bit-stream to output the reduction data topivotData
- the next pivot value dataIOException
- if an exception occurs while reading from the inputpublic Iterable<Map<String,Object>> getPivotedResponse(Map<String,PivotNode.PivotBranch.PivotDataPair<T>> pivot)
PivotNode
getPivotedResponse
in class PivotNode<PivotNode.PivotBranch.PivotDataPair<T>>
pivot
- the pivot to create a response forCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.