@InterfaceAudience.Private @InterfaceStability.Unstable public class FileSystemTimelineWriterImpl extends org.apache.hadoop.service.AbstractService implements TimelineWriter
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TIMELINE_FS_WRITER_NUM_RETRIES |
static long |
DEFAULT_TIMELINE_FS_WRITER_RETRY_INTERVAL_MS |
static String |
ENTITIES_DIR |
static String |
TIMELINE_FS_WRITER_NUM_RETRIES |
static String |
TIMELINE_FS_WRITER_RETRY_INTERVAL_MS |
static String |
TIMELINE_SERVICE_STORAGE_DIR_ROOT
Config param for timeline service storage tmp root for FILE YARN-3264.
|
static String |
TIMELINE_SERVICE_STORAGE_EXTENSION
Default extension for output files.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse |
aggregate(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity data,
TimelineAggregationTrack track)
Aggregates the entity information to the timeline store based on which
track this entity is to be rolled up to The tracks along which aggregations
are to be done are given by
TimelineAggregationTrack
Any errors occurring for individual write request objects will be reported
in the response. |
void |
flush()
Flushes the data to the backend storage.
|
void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
void |
serviceStart() |
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse |
write(TimelineCollectorContext context,
org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain)
Stores
TimelineDomain object to the timeline
store. |
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse |
write(TimelineCollectorContext context,
org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities,
org.apache.hadoop.security.UserGroupInformation callerUgi)
Stores the entire information in
TimelineEntities to the timeline
store. |
protected void |
writeFile(org.apache.hadoop.fs.Path outputPath,
byte[] data)
In order to make this writeInternal atomic as a part of writeInternal
we will first writeInternal data to .tmp file and then rename it.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final String TIMELINE_SERVICE_STORAGE_DIR_ROOT
public static final String TIMELINE_FS_WRITER_NUM_RETRIES
public static final int DEFAULT_TIMELINE_FS_WRITER_NUM_RETRIES
public static final String TIMELINE_FS_WRITER_RETRY_INTERVAL_MS
public static final long DEFAULT_TIMELINE_FS_WRITER_RETRY_INTERVAL_MS
public static final String ENTITIES_DIR
public static final String TIMELINE_SERVICE_STORAGE_EXTENSION
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities, org.apache.hadoop.security.UserGroupInformation callerUgi) throws IOException
TimelineWriterTimelineEntities to the timeline
store. Any errors occurring for individual write request objects will be
reported in the response.write in interface TimelineWritercontext - a TimelineCollectorContextentities - a TimelineEntities object.callerUgi - UserGroupInformation.TimelineWriteResponse object.IOException - if there is any exception encountered while storing or
writing entities to the back end storage.public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain) throws IOException
TimelineWriterTimelineDomain object to the timeline
store. Any errors occurring for individual write request objects will be
reported in the response.write in interface TimelineWritercontext - a TimelineCollectorContextdomain - a TimelineDomain object.TimelineWriteResponse object.IOException - if there is any exception encountered while storing or
writing entities to the back end storage.public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse aggregate(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity data,
TimelineAggregationTrack track)
throws IOException
TimelineWriterTimelineAggregationTrack
Any errors occurring for individual write request objects will be reported
in the response.aggregate in interface TimelineWriterdata - a TimelineEntity object
a TimelineAggregationTrack enum
value.track - Specifies the track or dimension along which aggregation would
occur. Includes USER, FLOW, QUEUE, etc.TimelineWriteResponse object.IOException - if there is any exception encountered while aggregating
entities to the backend storage.public void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionpublic void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionpublic void flush()
throws IOException
TimelineWriterflush in interface TimelineWriterIOException - if there is any exception encountered while flushing
entities to the backend storage.protected void writeFile(org.apache.hadoop.fs.Path outputPath,
byte[] data)
throws IOException
IOExceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.