SerializedRecord (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.contrib.failmon
Class SerializedRecord

    java.lang.Object
      org.apache.hadoop.contrib.failmon.SerializedRecord

    public class SerializedRecord

extends Object

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

### SerializedRecord

    public SerializedRecord(EventRecord source)

  Create the SerializedRecord given an EventRecord.

Method Detail

### set

    public void set(String fieldName,
                    String fieldValue)

  Set the value of a property of the EventRecord.

  Parameters:
    `fieldName` - the name of the property to set
    `fieldValue` - the value of the property to set

### get

    public String get(String fieldName)

  Get the value of a property of the EventRecord. If the property with the specific key is not found, null is returned.

  Parameters:
    `fieldName` - the name of the property to get.

### arrangeKeys

    public 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.

  Parameters:
    `keys` - The input ArrayList of keys to re-arrange.

### isValid

    public boolean isValid()

  Check if the SerializedRecord is a valid one, i.e., whether it represents meaningful metric values.

  Returns:
    true if the EventRecord is a valid one, false otherwise.

### toString

    public String toString()

  Creates and returns a string reperssentation of the object

  Overrides:
    `toString` in class `Object`
  Returns:
    a String representing the object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation