|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.contrib.failmon.EventRecord
public class EventRecord
Objects of this class represent metrics collected for a specific hardware source. Each EventRecord contains a HashMap of (key, value) pairs, each of which represents a property of the metered value. For instance, when parsing a log file, an EventRecord is created for each log entry, which contains the hostname and the ip addresses of the node, timestamp of the log entry, the actual message etc. Each and every EventRecord contains the hostname of the machine on which it was collected, its IP address and the time of collection. The main purpose of this class is to provide a uniform format for records collected from various system compontents (logs, ifconfig, smartmontools, lm-sensors etc). All metric values are converted into this format after they are collected by a Monitored object.
Constructor Summary | |
---|---|
EventRecord()
Create the EventRecord with no fields other than "invalid" as the hostname. |
|
EventRecord(String _hostname,
Object[] _ips,
Calendar _timestamp,
String _type,
String _logLevel,
String _source,
String _message)
Create the EventRecord given the most common properties among different metric types. |
Method Summary | |
---|---|
Object |
get(String fieldName)
Get the value of a property of the EventRecord. |
HashMap<String,Object> |
getMap()
Return the HashMap of properties of the EventRecord. |
boolean |
isValid()
Check if the EventRecord is a valid one, i.e., whether it represents meaningful metric values. |
void |
set(String fieldName,
Object fieldValue)
Set the value of a property of the EventRecord. |
String |
toString()
Creates and returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventRecord(String _hostname, Object[] _ips, Calendar _timestamp, String _type, String _logLevel, String _source, String _message)
public EventRecord()
Method Detail |
---|
public final HashMap<String,Object> getMap()
public void set(String fieldName, Object fieldValue)
fieldName
- the name of the property to setfieldValue
- the value of the property to setpublic Object get(String fieldName)
fieldName
- the name of the property to get.public boolean isValid()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |