Class SummaryStatsPostProcessor
- java.lang.Object
-
- org.epics.archiverappliance.retrieval.postprocessors.SummaryStatsPostProcessor
-
- All Implemented Interfaces:
FillNoFillSupport
,PostProcessor
,PostProcessorWithConsolidatedEventStream
- Direct Known Subclasses:
Count
,ErrorBars
,Jitter
,Kurtosis
,LinearInterpolation
,LoessInterpolation
,Max
,Mean
,Median
,Min
,PopulationVariance
,RMS
,Skewness
,StandardDeviation
,Statistics
,Variance
public abstract class SummaryStatsPostProcessor extends Object implements PostProcessor, PostProcessorWithConsolidatedEventStream, FillNoFillSupport
Abstract class for various operators that operate on a SummaryStatistics Child classes implement the getIdentity and the getStats method.- Author:
- mshankar
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkedHashMap<Long,org.epics.archiverappliance.retrieval.postprocessors.SummaryStatsPostProcessor.SummaryValue>
consolidatedData
-
Constructor Summary
Constructors Constructor Description SummaryStatsPostProcessor()
-
Method Summary
Modifier and Type Method Description void
doNotInheritValuesFromPrevioisBins()
long
estimateMemoryConsumption(String pvName, PVTypeInfo typeInfo, Timestamp start, Timestamp end, javax.servlet.http.HttpServletRequest req)
Estimate the amount of memory required for the data generated by the post processors.LinkedList<TimeSpan>
getBinTimestamps()
static LinkedList<TimeSpan>
getBinTimestamps(long firstBin, long lastBin, int intervalSecs)
abstract SummaryStatsCollector
getCollector()
EventStream
getConsolidatedEventStream()
int
getElementCount()
long
getEndBinEpochSeconds()
String
getExtension()
This is the full form of the identity for the post processor and includes any parameters for the post processor.abstract String
getIdentity()
The string used by clients to identify this post processor when making retrieval requests.long
getStartBinEpochSeconds()
void
initialize(String userarg, String pvName)
Initialize this post processor for the given PV and request parameters.boolean
isProvidingVectorData()
Callable<EventStream>
wrap(Callable<EventStream> callable)
Primary data generation method.boolean
zeroOutEmptyBins()
For some post processors, we do fill empty bins but with zeroes instead.
-
-
-
Field Detail
-
consolidatedData
protected LinkedHashMap<Long,org.epics.archiverappliance.retrieval.postprocessors.SummaryStatsPostProcessor.SummaryValue> consolidatedData
-
-
Method Detail
-
getIdentity
public abstract String getIdentity()
Description copied from interface:PostProcessor
The string used by clients to identify this post processor when making retrieval requests. For example to identify the FirstSamplePP postprocessor, users would add a pp=firstSample to the request for data. The situation is a little more complex; if a post processor has parameters then it needs to combine these into a string and offer that as an extension. The identity is just the starting part of this.- For example, pp=firstSample_600 asks the server to sparsify with an interval of 600 seconds.
- identity is firstSample.
- extension is firstSample_600.
- User specifies firstSample_600.
- ETL caches the data as firstSample_600 if asked to.
- Specified by:
getIdentity
in interfacePostProcessor
- Returns:
- identify
-
getCollector
public abstract SummaryStatsCollector getCollector()
-
isProvidingVectorData
public boolean isProvidingVectorData()
- Returns:
- true if this post processor is providing an array (list) of data, or false if a single value is provided
-
getElementCount
public int getElementCount()
- Returns:
- the number of elements per sample that this post processor provides
-
initialize
public void initialize(String userarg, String pvName) throws IOException
Description copied from interface:PostProcessor
Initialize this post processor for the given PV and request parameters.- Specified by:
initialize
in interfacePostProcessor
- Parameters:
userarg
- This is the full form (extension) of the identity for the post processor.pvName
- The name of PV- Throws:
IOException
-
-
estimateMemoryConsumption
public long estimateMemoryConsumption(String pvName, PVTypeInfo typeInfo, Timestamp start, Timestamp end, javax.servlet.http.HttpServletRequest req)
Description copied from interface:PostProcessor
Estimate the amount of memory required for the data generated by the post processors.- Specified by:
estimateMemoryConsumption
in interfacePostProcessor
- Parameters:
pvName
- The name of PVtypeInfo
- PVTypeInfostart
- Timestampend
- Timestampreq
- HttpServletRequest- Returns:
- Estimated Memory comsumption
-
wrap
public Callable<EventStream> wrap(Callable<EventStream> callable)
Description copied from interface:PostProcessor
Primary data generation method. Using the event stream provided, do your magic and generate processed data- Specified by:
wrap
in interfacePostProcessor
- Parameters:
callable
-- Returns:
- EventStream
-
getExtension
public String getExtension()
Description copied from interface:PostProcessor
This is the full form of the identity for the post processor and includes any parameters for the post processor. The exact format and interpretation of this is left to the post processor; however the convention is to use underscores to separate the params and have them in a specific order.- Specified by:
getExtension
in interfacePostProcessor
- Returns:
- extension
- See Also:
PostProcessor.getIdentity()
-
getConsolidatedEventStream
public EventStream getConsolidatedEventStream()
- Specified by:
getConsolidatedEventStream
in interfacePostProcessorWithConsolidatedEventStream
-
getStartBinEpochSeconds
public long getStartBinEpochSeconds()
- Specified by:
getStartBinEpochSeconds
in interfacePostProcessorWithConsolidatedEventStream
-
getEndBinEpochSeconds
public long getEndBinEpochSeconds()
- Specified by:
getEndBinEpochSeconds
in interfacePostProcessorWithConsolidatedEventStream
-
getBinTimestamps
public LinkedList<TimeSpan> getBinTimestamps()
- Specified by:
getBinTimestamps
in interfacePostProcessorWithConsolidatedEventStream
-
getBinTimestamps
public static LinkedList<TimeSpan> getBinTimestamps(long firstBin, long lastBin, int intervalSecs)
-
doNotInheritValuesFromPrevioisBins
public void doNotInheritValuesFromPrevioisBins()
- Specified by:
doNotInheritValuesFromPrevioisBins
in interfaceFillNoFillSupport
-
zeroOutEmptyBins
public boolean zeroOutEmptyBins()
Description copied from interface:FillNoFillSupport
For some post processors, we do fill empty bins but with zeroes instead.- Specified by:
zeroOutEmptyBins
in interfaceFillNoFillSupport
- Returns:
- boolean True or False
-
-