public abstract static class MovAvgModel.AbstractModelParser extends Object
Constructor and Description |
---|
AbstractModelParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkUnrecognizedParams(Map<String,Object> settings) |
abstract String |
getName()
Returns the name of the model
|
abstract MovAvgModel |
parse(Map<String,Object> settings,
String pipelineName,
int windowSize,
ParseFieldMatcher parseFieldMatcher)
Parse a settings hash that is specific to this model
|
protected boolean |
parseBoolParam(Map<String,Object> settings,
String name,
boolean defaultValue)
Extracts a boolean from the settings map, otherwise throws an exception
|
protected double |
parseDoubleParam(Map<String,Object> settings,
String name,
double defaultValue)
Extracts a 0-1 inclusive double from the settings map, otherwise throws an exception
|
protected int |
parseIntegerParam(Map<String,Object> settings,
String name,
int defaultValue)
Extracts an integer from the settings map, otherwise throws an exception
|
public abstract String getName()
public abstract MovAvgModel parse(@Nullable Map<String,Object> settings, String pipelineName, int windowSize, ParseFieldMatcher parseFieldMatcher) throws ParseException
settings
- Map of settings, extracted from the requestpipelineName
- Name of the parent pipeline aggwindowSize
- Size of the window for this moving avgparseFieldMatcher
- Matcher for field namesParseException
protected double parseDoubleParam(@Nullable Map<String,Object> settings, String name, double defaultValue) throws ParseException
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- Default value to be used if value does not exist in mapParseException
protected int parseIntegerParam(@Nullable Map<String,Object> settings, String name, int defaultValue) throws ParseException
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- Default value to be used if value does not exist in mapParseException
protected boolean parseBoolParam(@Nullable Map<String,Object> settings, String name, boolean defaultValue) throws ParseException
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- Default value to be used if value does not exist in mapParseException
protected void checkUnrecognizedParams(@Nullable Map<String,Object> settings) throws ParseException
ParseException
Copyright © 2009–2016. All rights reserved.