@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, waitForServiceToStop
public 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
TimelineWriter
TimelineEntities
to the timeline
store. Any errors occurring for individual write request objects will be
reported in the response.write
in interface TimelineWriter
context
- a TimelineCollectorContext
entities
- 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
TimelineWriter
TimelineDomain
object to the timeline
store. Any errors occurring for individual write request objects will be
reported in the response.write
in interface TimelineWriter
context
- a TimelineCollectorContext
domain
- 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
TimelineWriter
TimelineAggregationTrack
Any errors occurring for individual write request objects will be reported
in the response.aggregate
in interface TimelineWriter
data
- 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.AbstractService
Exception
public void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
public void flush() throws IOException
TimelineWriter
flush
in interface TimelineWriter
IOException
- 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
IOException
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.