org.apache.hadoop.yarn.util.timeline
Class TimelineUtils
java.lang.Object
org.apache.hadoop.yarn.util.timeline.TimelineUtils
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class TimelineUtils
- extends Object
The helper class for the timeline module.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimelineUtils
public TimelineUtils()
dumpTimelineRecordtoJSON
public static String dumpTimelineRecordtoJSON(Object o)
throws org.codehaus.jackson.JsonGenerationException,
org.codehaus.jackson.map.JsonMappingException,
IOException
- Serialize a POJO object into a JSON string not in a pretty format
- Parameters:
o
- an object to serialize
- Returns:
- a JSON string
- Throws:
IOException
org.codehaus.jackson.map.JsonMappingException
org.codehaus.jackson.JsonGenerationException
dumpTimelineRecordtoJSON
public static String dumpTimelineRecordtoJSON(Object o,
boolean pretty)
throws org.codehaus.jackson.JsonGenerationException,
org.codehaus.jackson.map.JsonMappingException,
IOException
- Serialize a POJO object into a JSON string
- Parameters:
o
- an object to serializepretty
- whether in a pretty format or not
- Returns:
- a JSON string
- Throws:
IOException
org.codehaus.jackson.map.JsonMappingException
org.codehaus.jackson.JsonGenerationException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.