@Public
@Evolving
public class TimelineUtils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DEFAULT_FLOW_VERSION |
|
static java.lang.String |
FLOW_NAME_TAG_PREFIX |
|
static java.lang.String |
FLOW_RUN_ID_TAG_PREFIX |
|
static java.lang.String |
FLOW_VERSION_TAG_PREFIX |
| Constructor | Description |
|---|---|
TimelineUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static org.apache.hadoop.io.Text |
buildTimelineTokenService(org.apache.hadoop.conf.Configuration conf) |
|
static org.apache.hadoop.yarn.api.records.timeline.TimelineAbout |
createTimelineAbout(java.lang.String about) |
|
static java.lang.String |
dumpTimelineRecordtoJSON(java.lang.Object o) |
Serialize a POJO object into a JSON string not in a pretty format
|
static java.lang.String |
dumpTimelineRecordtoJSON(java.lang.Object o,
boolean pretty) |
Serialize a POJO object into a JSON string
|
static java.lang.String |
generateDefaultFlowName(java.lang.String appName,
org.apache.hadoop.yarn.api.records.ApplicationId appId) |
|
static java.lang.String |
generateFlowNameTag(java.lang.String flowName) |
Generate flow name tag.
|
static java.lang.String |
generateFlowRunIdTag(long flowRunId) |
Generate flow run ID tag.
|
static java.lang.String |
generateFlowVersionTag(java.lang.String flowVersion) |
Generate flow version tag.
|
static float |
getTimelineServiceVersion(org.apache.hadoop.conf.Configuration conf) |
Returns the timeline service version.
|
static java.net.InetSocketAddress |
getTimelineTokenServiceAddress(org.apache.hadoop.conf.Configuration conf) |
|
static java.lang.String |
shortenFlowName(java.lang.String flowName,
org.apache.hadoop.conf.Configuration conf) |
Shortens the flow name for the configured size by removing UUID if present.
|
static boolean |
timelineServiceEnabled(org.apache.hadoop.conf.Configuration conf) |
Returns whether the timeline service is enabled via configuration.
|
static boolean |
timelineServiceV1_5Enabled(org.apache.hadoop.conf.Configuration conf) |
Returns whether the timeline service v.1.5 is enabled by default via
configuration.
|
public static final java.lang.String FLOW_NAME_TAG_PREFIX
public static final java.lang.String FLOW_VERSION_TAG_PREFIX
public static final java.lang.String FLOW_RUN_ID_TAG_PREFIX
public static final java.lang.String DEFAULT_FLOW_VERSION
public static java.lang.String dumpTimelineRecordtoJSON(java.lang.Object o)
throws com.fasterxml.jackson.core.JsonGenerationException,
com.fasterxml.jackson.databind.JsonMappingException,
java.io.IOException
o - an object to serializejava.io.IOException - io error occur.com.fasterxml.jackson.databind.JsonMappingException - exception used to signal fatal problems with mapping of content.com.fasterxml.jackson.core.JsonGenerationException - exception type for exceptions during JSON writing.public static java.lang.String dumpTimelineRecordtoJSON(java.lang.Object o,
boolean pretty)
throws com.fasterxml.jackson.core.JsonGenerationException,
com.fasterxml.jackson.databind.JsonMappingException,
java.io.IOException
o - an object to serializepretty - whether in a pretty format or notjava.io.IOException - io error occur.com.fasterxml.jackson.databind.JsonMappingException - exception used to signal fatal problems with mapping of content.com.fasterxml.jackson.core.JsonGenerationException - exception type for exceptions during JSON writing.public static boolean timelineServiceEnabled(org.apache.hadoop.conf.Configuration conf)
conf - the configurationpublic static float getTimelineServiceVersion(org.apache.hadoop.conf.Configuration conf)
conf - the configurationpublic static boolean timelineServiceV1_5Enabled(org.apache.hadoop.conf.Configuration conf)
conf - the configurationpublic static org.apache.hadoop.yarn.api.records.timeline.TimelineAbout createTimelineAbout(java.lang.String about)
public static java.net.InetSocketAddress getTimelineTokenServiceAddress(org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.io.Text buildTimelineTokenService(org.apache.hadoop.conf.Configuration conf)
public static java.lang.String generateDefaultFlowName(java.lang.String appName,
org.apache.hadoop.yarn.api.records.ApplicationId appId)
public static java.lang.String generateFlowNameTag(java.lang.String flowName)
flowName - flow name that identifies a distinct flow application which
can be run repeatedly over timepublic static java.lang.String shortenFlowName(java.lang.String flowName,
org.apache.hadoop.conf.Configuration conf)
flowName - which has to be shortenedconf - to resize the flow namepublic static java.lang.String generateFlowVersionTag(java.lang.String flowVersion)
flowVersion - flow version that keeps track of the changes made to the
flowpublic static java.lang.String generateFlowRunIdTag(long flowRunId)
flowRunId - flow run ID that identifies one instance (or specific
execution) of that flowCopyright © 2008–2025 Apache Software Foundation. All rights reserved.