Class AggregatedSearchQueryProvider
- java.lang.Object
-
- org.opennms.netmgt.flows.elastic.agg.AggregatedSearchQueryProvider
-
- All Implemented Interfaces:
FilterVisitor<java.lang.String>
public class AggregatedSearchQueryProvider extends java.lang.Object implements FilterVisitor<java.lang.String>
Here we store the search queries in the class-path in the form of Freemarker templates and use the templating to perform the parameter substitution. We could consider removing this in favor of using the High-level Elasticsearch client.
-
-
Constructor Summary
Constructors Constructor Description AggregatedSearchQueryProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAllTerms(GroupedBy groupedBy, java.lang.String groupedByField, int fieldSize, java.util.List<Filter> filters)
java.lang.String
getFlowCountQuery(java.util.List<Filter> filters)
java.lang.String
getHostname(java.lang.String host, java.util.List<Filter> filters)
java.lang.String
getSeriesFromTopNQuery(int N, GroupedBy groupedBy, java.lang.String aggregationType, java.lang.String key, long step, long start, long end, java.util.List<Filter> filters)
java.lang.String
getSeriesFromTotalsQuery(GroupedBy groupedBy, long step, long start, long end, java.util.List<Filter> filters)
java.lang.String
getSumQuery(GroupedBy groupedBy, java.util.List<Filter> filters)
java.lang.String
getTopNQuery(int N, GroupedBy groupedBy, java.lang.String aggregationType, java.lang.String key, java.util.List<Filter> filters)
java.lang.String
visit(DscpFilter dscpFilter)
java.lang.String
visit(ExporterNodeFilter exporterNodeFilter)
java.lang.String
visit(SnmpInterfaceIdFilter snmpInterfaceIdFilter)
java.lang.String
visit(TimeRangeFilter timeRangeFilter)
-
-
-
Method Detail
-
getFlowCountQuery
public java.lang.String getFlowCountQuery(java.util.List<Filter> filters)
-
getSumQuery
public java.lang.String getSumQuery(GroupedBy groupedBy, java.util.List<Filter> filters)
-
getTopNQuery
public java.lang.String getTopNQuery(int N, GroupedBy groupedBy, java.lang.String aggregationType, java.lang.String key, java.util.List<Filter> filters)
-
getSeriesFromTotalsQuery
public java.lang.String getSeriesFromTotalsQuery(GroupedBy groupedBy, long step, long start, long end, java.util.List<Filter> filters)
-
getSeriesFromTopNQuery
public java.lang.String getSeriesFromTopNQuery(int N, GroupedBy groupedBy, java.lang.String aggregationType, java.lang.String key, long step, long start, long end, java.util.List<Filter> filters)
-
getAllTerms
public java.lang.String getAllTerms(GroupedBy groupedBy, java.lang.String groupedByField, int fieldSize, java.util.List<Filter> filters)
-
visit
public java.lang.String visit(ExporterNodeFilter exporterNodeFilter)
- Specified by:
visit
in interfaceFilterVisitor<java.lang.String>
-
visit
public java.lang.String visit(TimeRangeFilter timeRangeFilter)
- Specified by:
visit
in interfaceFilterVisitor<java.lang.String>
-
visit
public java.lang.String visit(SnmpInterfaceIdFilter snmpInterfaceIdFilter)
- Specified by:
visit
in interfaceFilterVisitor<java.lang.String>
-
getHostname
public java.lang.String getHostname(java.lang.String host, java.util.List<Filter> filters)
-
visit
public java.lang.String visit(DscpFilter dscpFilter)
- Specified by:
visit
in interfaceFilterVisitor<java.lang.String>
-
-