Class Bucket
java.lang.Object
org.elasticsearch.client.ml.job.results.Bucket
- All Implemented Interfaces:
ToXContent,ToXContentObject
public class Bucket extends java.lang.Object implements ToXContentObject
Bucket Result POJO
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
Fields Modifier and Type Field Description static ParseFieldANOMALY_SCOREstatic ParseFieldBUCKET_INFLUENCERSstatic ParseFieldBUCKET_SPANstatic ParseFieldEVENT_COUNTstatic ParseFieldINITIAL_ANOMALY_SCOREstatic ConstructingObjectParser<Bucket,java.lang.Void>PARSERstatic ParseFieldPROCESSING_TIME_MSstatic ParseFieldRECORDSstatic ParseFieldRESULT_TYPE_FIELDstatic java.lang.StringRESULT_TYPE_VALUEResult typestatic ParseFieldRESULTS_FIELDstatic ParseFieldSCHEDULED_EVENTS -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object other)Compare all the fields and embedded anomaly records (if any)doublegetAnomalyScore()java.util.List<BucketInfluencer>getBucketInfluencers()longgetBucketSpan()Bucketspan expressed in secondslonggetEventCount()The number of records (events) actually processed in this bucket.doublegetInitialAnomalyScore()java.lang.StringgetJobId()longgetProcessingTimeMs()java.util.List<AnomalyRecord>getRecords()Get all the anomaly records associated with this bucket.java.util.List<java.lang.String>getScheduledEvents()java.util.DategetTimestamp()inthashCode()booleanisInterim()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)
-
Field Details
-
ANOMALY_SCORE
-
INITIAL_ANOMALY_SCORE
-
EVENT_COUNT
-
RECORDS
-
BUCKET_INFLUENCERS
-
BUCKET_SPAN
-
PROCESSING_TIME_MS
-
SCHEDULED_EVENTS
-
RESULTS_FIELD
-
RESULT_TYPE_VALUE
public static final java.lang.String RESULT_TYPE_VALUEResult type- See Also:
- Constant Field Values
-
RESULT_TYPE_FIELD
-
PARSER
-
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
getJobId
public java.lang.String getJobId() -
getTimestamp
public java.util.Date getTimestamp() -
getBucketSpan
public long getBucketSpan()Bucketspan expressed in seconds -
getAnomalyScore
public double getAnomalyScore() -
getInitialAnomalyScore
public double getInitialAnomalyScore() -
getRecords
Get all the anomaly records associated with this bucket. The records are not part of the bucket document. They will only be present when the bucket was retrieved and expanded to contain the associated records.- Returns:
- the anomaly records for the bucket IF the bucket was expanded.
-
getEventCount
public long getEventCount()The number of records (events) actually processed in this bucket. -
isInterim
public boolean isInterim() -
getProcessingTimeMs
public long getProcessingTimeMs() -
getBucketInfluencers
-
getScheduledEvents
public java.util.List<java.lang.String> getScheduledEvents() -
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)Compare all the fields and embedded anomaly records (if any)- Overrides:
equalsin classjava.lang.Object
-