|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.contrib.failmon.SerializedRecord
public class SerializedRecord
Objects of this class hold the serialized representations of EventRecords. A SerializedRecord is essentially an EventRecord with all its property values converted to strings. It also provides some convenience methods for printing the property fields in a more readable way.
Constructor Summary | |
---|---|
SerializedRecord(EventRecord source)
Create the SerializedRecord given an EventRecord. |
Method Summary | |
---|---|
static void |
arrangeKeys(ArrayList<String> keys)
Arrange the keys to provide a more readable printing order: first goes the timestamp, then the hostname and then the type, followed by all other keys found. |
String |
get(String fieldName)
Get the value of a property of the EventRecord. |
boolean |
isValid()
Check if the SerializedRecord is a valid one, i.e., whether it represents meaningful metric values. |
void |
set(String fieldName,
String fieldValue)
Set the value of a property of the EventRecord. |
String |
toString()
Creates and returns a string reperssentation of the object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SerializedRecord(EventRecord source)
Method Detail |
---|
public void set(String fieldName, String fieldValue)
fieldName
- the name of the property to setfieldValue
- the value of the property to setpublic String get(String fieldName)
fieldName
- the name of the property to get.public static void arrangeKeys(ArrayList<String> keys)
keys
- The input ArrayList of keys to re-arrange.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 |