Class NoOpTimelineWriterImpl
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.timelineservice.storage.NoOpTimelineWriterImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service,TimelineWriter
public class NoOpTimelineWriterImpl
extends org.apache.hadoop.service.AbstractService
implements TimelineWriter
Stub based implementation for TimelineWriter. This implementation will
not provide a complete implementation of all the necessary features. This
implementation is provided solely for basic testing purposes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Constructor Summary
Constructors -
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 class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.service.Service
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
-
Constructor Details
-
NoOpTimelineWriterImpl
public NoOpTimelineWriterImpl()
-
-
Method Details
-
write
public 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 Description copied from interface:TimelineWriterStores the entire information inTimelineEntitiesto the timeline store. Any errors occurring for individual write request objects will be reported in the response.- Specified by:
writein interfaceTimelineWriter- 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
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse write(TimelineCollectorContext context, org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain) throws IOException Description copied from interface:TimelineWriterStoresTimelineDomainobject to the timeline store. Any errors occurring for individual write request objects will be reported in the response.- Specified by:
writein interfaceTimelineWriter- 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
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse aggregate(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity data, TimelineAggregationTrack track) throws IOException Description copied from interface:TimelineWriterAggregates 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.
- Specified by:
aggregatein interfaceTimelineWriter- 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
Description copied from interface:TimelineWriterFlushes 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.- Specified by:
flushin interfaceTimelineWriter- Throws:
IOException- if there is any exception encountered while flushing entities to the backend storage.
-
getHealthStatus
public org.apache.hadoop.yarn.api.records.timeline.TimelineHealth getHealthStatus()Description copied from interface:TimelineWriterCheck if writer connection is working properly.- Specified by:
getHealthStatusin interfaceTimelineWriter- Returns:
- True if writer connection works as expected, false otherwise.
-