public abstract class PivotNode<T> extends SortableFacet implements Consumer<String>
AnalyticsDriver.| Modifier and Type | Class and Description |
|---|---|
static class |
PivotNode.PivotBranch<T>
A pivot node that has pivot children.
|
static class |
PivotNode.PivotLeaf
A pivot node that has no pivot children.
|
SortableFacet.FacetBucket, SortableFacet.FacetSortSpecification| Modifier and Type | Field and Description |
|---|---|
protected Map<String,T> |
currentPivot |
sortcollectionManager, expressionCalculator, name, reductionData| Constructor and Description |
|---|
PivotNode(String name,
StringValueStream expression) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFacetValueCollectionTargets(Map<String,T> pivot)
Determine which facet values match the current document.
|
void |
exportPivot(DataOutput output,
Map<String,T> pivot)
Export the shard data through a bit-stream for the given pivot,
to be imported by the
importPivot(java.io.DataInput, java.util.Map<java.lang.String, T>) method in the originating shard. |
protected abstract void |
exportPivotValue(DataOutput output,
T pivotData)
Export the given pivot data, containing
ReductionData and pivot children if they exist. |
abstract Iterable<Map<String,Object>> |
getPivotedResponse(Map<String,T> pivot)
Create the response of the facet to be returned in the overall analytics response.
|
void |
importPivot(DataInput input,
Map<String,T> pivot)
Import the shard data from a bit-stream for the given pivot, exported by the
exportPivot(java.io.DataOutput, java.util.Map<java.lang.String, T>) method
in the each of the collection's shards. |
protected abstract void |
importPivotValue(DataInput input,
String pivotValue)
Import the next pivot value's set of
ReductionData and children's ReductionData if they exist. |
applyOptions, createOldResponse, createResponse, getSort, setSortexportFacetValue, exportShardData, getName, importFacetValue, importShardData, setExpressionCalculator, setReductionCollectionManagerpublic PivotNode(String name, StringValueStream expression)
public void addFacetValueCollectionTargets(Map<String,T> pivot)
ReductionCollectionManager.ReductionDataCollections of the relevant facet values
to the targets of the streaming ReductionCollectionManager so that they are updated with the current document's data.public void importPivot(DataInput input, Map<String,T> pivot) throws IOException
exportPivot(java.io.DataOutput, java.util.Map<java.lang.String, T>) method
in the each of the collection's shards.input - The bit-stream to import the data frompivot - the values for this pivot node and the pivot children (if they exist)IOException - if an exception occurs while reading from the DataInputprotected abstract void importPivotValue(DataInput input, String pivotValue) throws IOException
ReductionData and children's ReductionData if they exist.input - the bit-stream to import the reduction data frompivotValue - the next pivot valueIOException - if an exception occurs while reading from the inputpublic void exportPivot(DataOutput output, Map<String,T> pivot) throws IOException
importPivot(java.io.DataInput, java.util.Map<java.lang.String, T>) method in the originating shard.output - The bit-stream to output the data throughpivot - the values for this pivot node and the pivot children (if they exist)IOException - if an exception occurs while writing to the DataOutputprotected abstract void exportPivotValue(DataOutput output, T pivotData) throws IOException
ReductionData and pivot children if they exist.output - the bit-stream to output the reduction data topivotData - the next pivot value dataIOException - if an exception occurs while reading from the inputCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.