com.cloudera.api.model
Class ApiEvent

java.lang.Object
  extended by com.cloudera.api.model.ApiEvent

public class ApiEvent
extends Object

Events model noteworthy incidents in Cloudera Manager or the managed Hadoop cluster. An event carries its event category, severity, and a string content. They also have generic attributes, which are free-form key value pairs. Important events may be promoted into alerts.


Constructor Summary
ApiEvent()
           
ApiEvent(String id, Date timeOccurred, Date timeReceived, ApiEventCategory category, ApiEventSeverity severity, String content, boolean alert, Map<String,List<String>> attrMap)
           
 
Method Summary
 boolean equals(Object o)
           
 List<ApiEventAttribute> getAttributes()
          A list of key-value attribute pairs.
 ApiEventCategory getCategory()
          The category of this event -- whether it is a health event, an audit event, an activity event, etc.
 String getContent()
          The content payload of this event.
 String getId()
          A unique ID for this event.
 ApiEventSeverity getSeverity()
          The severity of the event.
 Date getTimeOccurred()
          When the event was generated.
 Date getTimeReceived()
          When the event was stored by Cloudera Manager.
 int hashCode()
           
 boolean isAlert()
          Whether the event is promoted to an alert according to configuration.
 void setAlert(boolean alert)
           
 void setAttributes(List<ApiEventAttribute> attributes)
           
 void setCategory(ApiEventCategory category)
           
 void setContent(String content)
           
 void setId(String id)
           
 void setSeverity(ApiEventSeverity severity)
           
 void setTimeOccurred(Date timeOccurred)
           
 void setTimeReceived(Date timeReceived)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApiEvent

public ApiEvent()

ApiEvent

public ApiEvent(String id,
                Date timeOccurred,
                Date timeReceived,
                ApiEventCategory category,
                ApiEventSeverity severity,
                String content,
                boolean alert,
                Map<String,List<String>> attrMap)
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getId

public String getId()
A unique ID for this event.


setId

public void setId(String id)

getContent

public String getContent()
The content payload of this event.


setContent

public void setContent(String content)

getTimeOccurred

public Date getTimeOccurred()
When the event was generated.


setTimeOccurred

public void setTimeOccurred(Date timeOccurred)

getTimeReceived

public Date getTimeReceived()
When the event was stored by Cloudera Manager. Events do not arrive in the order that they are generated. If you are writing an event poller, this is a useful field to query.


setTimeReceived

public void setTimeReceived(Date timeReceived)

getCategory

public ApiEventCategory getCategory()
The category of this event -- whether it is a health event, an audit event, an activity event, etc.


setCategory

public void setCategory(ApiEventCategory category)

getSeverity

public ApiEventSeverity getSeverity()
The severity of the event.


setSeverity

public void setSeverity(ApiEventSeverity severity)

isAlert

public boolean isAlert()
Whether the event is promoted to an alert according to configuration.


setAlert

public void setAlert(boolean alert)

getAttributes

public List<ApiEventAttribute> getAttributes()
A list of key-value attribute pairs.


setAttributes

public void setAttributes(List<ApiEventAttribute> attributes)


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.