Interface TimelineWriter
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.hadoop.service.Service
- All Known Implementing Classes:
NoOpTimelineWriterImpl
@Private
@Unstable
public interface TimelineWriter
extends org.apache.hadoop.service.Service
This interface is for storing application timeline information.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponseaggregate(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 byTimelineAggregationTrackAny errors occurring for individual write request objects will be reported in the response.voidflush()Flushes the data to the backend storage.org.apache.hadoop.yarn.api.records.timeline.TimelineHealthCheck if writer connection is working properly.org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponsewrite(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain) StoresTimelineDomainobject to the timeline store.org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponsewrite(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities data, org.apache.hadoop.security.UserGroupInformation callerUgi) Stores the entire information inTimelineEntitiesto the timeline store.Methods inherited from interface org.apache.hadoop.service.Service
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
-
Method Details
-
write
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities data, org.apache.hadoop.security.UserGroupInformation callerUgi) throws IOException Stores the entire information inTimelineEntitiesto the timeline store. Any errors occurring for individual write request objects will be reported in the response.- Parameters:
context- aTimelineCollectorContextdata- aTimelineEntitiesobject.callerUgi-UserGroupInformation.- Returns:
- a
TimelineWriteResponseobject. - Throws:
IOException- if there is any exception encountered while storing or writing entities to the back end storage.
-
write
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain) throws IOException StoresTimelineDomainobject to the timeline store. Any errors occurring for individual write request objects will be reported in the response.- Parameters:
context- aTimelineCollectorContextdomain- aTimelineDomainobject.- Returns:
- a
TimelineWriteResponseobject. - Throws:
IOException- if there is any exception encountered while storing or writing entities to the back end storage.
-
aggregate
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse aggregate(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity data, TimelineAggregationTrack track) throws IOException 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 byTimelineAggregationTrackAny errors occurring for individual write request objects will be reported in the response.This is not invoked anywhere, tested and all implementations return null.
- Parameters:
data- aTimelineEntityobject aTimelineAggregationTrackenum value.track- Specifies the track or dimension along which aggregation would occur. Includes USER, FLOW, QUEUE, etc.- Returns:
- a
TimelineWriteResponseobject. All implementations return null. - Throws:
IOException- if there is any exception encountered while aggregating entities to the backend storage.
-
flush
Flushes the data to the backend storage. Whatever may be buffered will be written to the storage when the method returns. This may be a potentially time-consuming operation, and should be used judiciously.- Throws:
IOException- if there is any exception encountered while flushing entities to the backend storage.
-
getHealthStatus
org.apache.hadoop.yarn.api.records.timeline.TimelineHealth getHealthStatus()Check if writer connection is working properly.- Returns:
- True if writer connection works as expected, false otherwise.
-