Interface PostProcessor
-
- All Known Implementing Classes:
CAPlotBinning
,Count
,DeadBand
,DefaultRawPostProcessor
,ErrorBars
,ExtraFieldsPostProcessor
,FirstFill
,FirstSamplePP
,Fliers
,IgnoreFliers
,Jitter
,Kurtosis
,LastFill
,LastSample
,LinearInterpolation
,LoessInterpolation
,Max
,Mean
,Median
,Min
,NCount
,Nth
,Optimized
,OptimizedWithLastSample
,PopulationVariance
,RMS
,Skewness
,StandardDeviation
,Statistics
,SummaryStatsPostProcessor
,TwoWeekRaw
,Variance
public interface PostProcessor
The interface for retrieval post processors. At a very high level, post processors wrap event streams and generate new event streams. To enable running in a thread pool, we make these take Callable<EventStream> and return Callable<EventStream> A PostProcessor has to also help make a determination as to whether to execute sequentially or execute in parallel based on the memory consumption when running in parallel.- Author:
- mshankar
-
-
Method Summary
Modifier and Type Method Description 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.String
getExtension()
This is the full form of the identity for the post processor and includes any parameters for the post processor.String
getIdentity()
The string used by clients to identify this post processor when making retrieval requests.void
initialize(String userarg, String pvName)
Initialize this post processor for the given PV and request parameters.Callable<EventStream>
wrap(Callable<EventStream> callable)
Primary data generation method.
-
-
-
Method Detail
-
getIdentity
String getIdentity()
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.
- Returns:
- identify
-
getExtension
String getExtension()
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.- Returns:
- extension
- See Also:
getIdentity()
-
initialize
void initialize(String userarg, String pvName) throws IOException
Initialize this post processor for the given PV and request parameters.- Parameters:
userarg
- This is the full form (extension) of the identity for the post processor.pvName
- The name of PV- Throws:
IOException
-
-
estimateMemoryConsumption
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.- Parameters:
pvName
- The name of PVtypeInfo
- PVTypeInfostart
- Timestampend
- Timestampreq
- HttpServletRequest- Returns:
- Estimated Memory comsumption
-
wrap
Callable<EventStream> wrap(Callable<EventStream> callable)
Primary data generation method. Using the event stream provided, do your magic and generate processed data- Parameters:
callable
-- Returns:
- EventStream
-
-