@InterfaceAudience.Public @InterfaceStability.Evolving public class TimelineUtils extends Object
Constructor and Description |
---|
TimelineUtils() |
Modifier and Type | Method and Description |
---|---|
static Text |
buildTimelineTokenService(Configuration conf) |
static TimelineAbout |
createTimelineAbout(String about) |
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 float |
getTimelineServiceVersion(Configuration conf)
Returns the timeline service version.
|
static InetSocketAddress |
getTimelineTokenServiceAddress(Configuration conf) |
static boolean |
timelineServiceEnabled(Configuration conf)
Returns whether the timeline service is enabled via configuration.
|
static boolean |
timelineServiceV1_5Enabled(Configuration conf)
Returns whether the timeline service v.1.5 is enabled via configuration.
|
public TimelineUtils()
public static String dumpTimelineRecordtoJSON(Object o) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, IOException
o
- an object to serializeIOException
org.codehaus.jackson.map.JsonMappingException
org.codehaus.jackson.JsonGenerationException
public static String dumpTimelineRecordtoJSON(Object o, boolean pretty) throws org.codehaus.jackson.JsonGenerationException, org.codehaus.jackson.map.JsonMappingException, IOException
o
- an object to serializepretty
- whether in a pretty format or notIOException
org.codehaus.jackson.map.JsonMappingException
org.codehaus.jackson.JsonGenerationException
public static boolean timelineServiceEnabled(Configuration conf)
conf
- the configurationpublic static float getTimelineServiceVersion(Configuration conf)
conf
- the configurationpublic static boolean timelineServiceV1_5Enabled(Configuration conf)
conf
- the configurationpublic static TimelineAbout createTimelineAbout(String about)
public static InetSocketAddress getTimelineTokenServiceAddress(Configuration conf)
public static Text buildTimelineTokenService(Configuration conf)
Copyright © 2017 Apache Software Foundation. All rights reserved.