public class AnalyticsRequestManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AnalyticsRequestManager.StreamingInfo
Class to encapsulate all necessary data for collecting
StreamingFacet s. |
Modifier and Type | Field and Description |
---|---|
String |
analyticsRequest
If the request is distributed, the manager for shard requests.
|
boolean |
sendShards |
AnalyticsShardRequestManager |
shardStream |
Constructor and Description |
---|
AnalyticsRequestManager(ReductionCollectionManager ungroupedReductionManager,
Collection<AnalyticsExpression> ungroupedExpressions)
Create an manager with the given ungrouped expressions.
|
Modifier and Type | Method and Description |
---|---|
void |
addGrouping(AnalyticsGroupingManager groupingManager)
Add a grouping to the request.
|
void |
addUngroupedResults(Map<String,Object> response)
Generate the results of all ungrouped expressions, including grouped expressions if
the old request notation is used.
|
NamedList<Object> |
createOldResponse()
Create the response for a request given in the old olap-style format.
|
Map<String,Object> |
createResponse()
Create the response for a request.
|
void |
exportShardData(DataOutput output)
Export the shard data for this request through a bit-stream,
to be imported by the
importShardData(java.io.DataInput) method in the originating shard. |
Iterable<AbstractSolrQueryFacet.FacetValueQueryExecuter> |
getFacetExecuters(Filter filter,
SolrQueryRequest queryRequest)
Create the
AbstractSolrQueryFacet.FacetValueQueryExecuter s for all AbstractSolrQueryFacet s contained in the request. |
AnalyticsRequestManager.StreamingInfo |
getStreamingFacetInfo()
Consolidate the information of all
StreamingFacet s contained within the request, since
they need to be collected along with the overall results during the streaming phase of the
AnalyticsDriver . |
ReductionCollectionManager |
getUngroupedCollectionManager()
Get the collection manager for ungrouped expressions, including grouped expressions if
the old request notation is used.
|
ReductionCollectionManager.ReductionDataCollection |
getUngroupedData()
Get the collection manager for all ungrouped expressions, including grouped expressions if
the old request notation is used.
|
Iterable<AnalyticsExpression> |
getUngroupedExpressions()
Return all ungrouped expressions, including grouped expressions if
the old request notation is used.
|
Map<String,Object> |
getUngroupedResults()
Generate the results of all ungrouped expressions, including grouped expressions if
the old request notation is used.
|
void |
importShardData(DataInput input)
Import the shard data for this request from a bit-stream,
exported by the
exportShardData(java.io.DataOutput) method in the each of the collection's shards. |
public String analyticsRequest
public AnalyticsShardRequestManager shardStream
public boolean sendShards
public AnalyticsRequestManager(ReductionCollectionManager ungroupedReductionManager, Collection<AnalyticsExpression> ungroupedExpressions)
ungroupedReductionManager
- to manage the reduction collection for all ungrouped expressionsungroupedExpressions
- to compute overall results forpublic ReductionCollectionManager getUngroupedCollectionManager()
public ReductionCollectionManager.ReductionDataCollection getUngroupedData()
public Iterable<AnalyticsExpression> getUngroupedExpressions()
Iterable
of the ungrouped expressionspublic void addUngroupedResults(Map<String,Object> response)
response
- the response to add the ungrouped results to.public Map<String,Object> getUngroupedResults()
public void addGrouping(AnalyticsGroupingManager groupingManager)
groupingManager
- that manages the groupingpublic void importShardData(DataInput input) throws IOException
exportShardData(java.io.DataOutput)
method in the each of the collection's shards.
First the overall data is imported, then the grouping data is imported.
input
- The bit-stream to import the shard data fromIOException
- if an exception occurs while reading from the DataInput
public void exportShardData(DataOutput output) throws IOException
importShardData(java.io.DataInput)
method in the originating shard.
First the overall data is exported, then the grouping data is exported.
output
- The bit-stream to output the shard data throughIOException
- if an exception occurs while writing to the DataOutput
public AnalyticsRequestManager.StreamingInfo getStreamingFacetInfo()
StreamingFacet
s contained within the request, since
they need to be collected along with the overall results during the streaming phase of the
AnalyticsDriver
.StreamingFacet
spublic Iterable<AbstractSolrQueryFacet.FacetValueQueryExecuter> getFacetExecuters(Filter filter, SolrQueryRequest queryRequest)
AbstractSolrQueryFacet.FacetValueQueryExecuter
s for all AbstractSolrQueryFacet
s contained in the request.filter
- representing the overall search queryqueryRequest
- of the overall search queryIterable
of executerspublic NamedList<Object> createOldResponse()
NamedList
representation of the responsepublic Map<String,Object> createResponse()
NOTE: Analytics requests specified in the old olap-style format
have their responses generated by createOldResponse()
.
Map
representation of the responseCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.