org.apache.hadoop.yarn.util.timeline
Class TimelineUtils

java.lang.Object
  extended by org.apache.hadoop.yarn.util.timeline.TimelineUtils

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class TimelineUtils
extends Object

The helper class for the timeline module.


Constructor Summary
TimelineUtils()
           
 
Method Summary
static Text buildTimelineTokenService(Configuration conf)
           
static String dumpTimelineRecordtoJSON(Object o)
          Serialize a POJO object into a JSON string not in a pretty format
static String dumpTimelineRecordtoJSON(Object o, boolean pretty)
          Serialize a POJO object into a JSON string
static InetSocketAddress getTimelineTokenServiceAddress(Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimelineUtils

public TimelineUtils()
Method Detail

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 serialize
pretty - whether in a pretty format or not
Returns:
a JSON string
Throws:
IOException
org.codehaus.jackson.map.JsonMappingException
org.codehaus.jackson.JsonGenerationException

getTimelineTokenServiceAddress

public static InetSocketAddress getTimelineTokenServiceAddress(Configuration conf)

buildTimelineTokenService

public static Text buildTimelineTokenService(Configuration conf)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.