java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.ServiceAppLevelTimelineCollector@Private
@Unstable
public abstract class TimelineCollector
extends org.apache.hadoop.service.CompositeService
| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
TimelineCollector.AggregationStatusTable |
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
SEPARATOR |
| Constructor | Description |
|---|---|
TimelineCollector(java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity |
aggregateEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities,
java.lang.String resultEntityId,
java.lang.String resultEntityType,
boolean needsGroupIdInResult) |
Aggregate all metrics in given timeline entities with no predefined states.
|
protected java.util.Map<java.lang.String,TimelineCollector.AggregationStatusTable> |
getAggregationGroups() |
|
protected java.util.Set<java.lang.String> |
getEntityTypesSkipAggregation() |
Method to decide the set of timeline entity types the collector should
skip on aggregations.
|
abstract TimelineCollectorContext |
getTimelineEntityContext() |
|
protected boolean |
isReadyToAggregate() |
|
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse |
putDomain(org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain,
org.apache.hadoop.security.UserGroupInformation callerUgi) |
Add or update an domain.
|
org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse |
putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities,
org.apache.hadoop.security.UserGroupInformation callerUgi) |
Handles entity writes.
|
void |
putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities,
org.apache.hadoop.security.UserGroupInformation callerUgi) |
Handles entity writes in an asynchronous manner.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
|
protected void |
serviceStart() |
|
protected void |
serviceStop() |
|
protected void |
setReadyToAggregate() |
|
protected void |
setWriter(TimelineWriter w) |
addIfService, addService, getServices, removeServiceclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final java.lang.String SEPARATOR
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.CompositeServicejava.lang.Exceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.CompositeServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.CompositeServicejava.lang.Exceptionprotected void setWriter(TimelineWriter w)
protected java.util.Map<java.lang.String,TimelineCollector.AggregationStatusTable> getAggregationGroups()
protected void setReadyToAggregate()
protected boolean isReadyToAggregate()
protected java.util.Set<java.lang.String> getEntityTypesSkipAggregation()
public abstract TimelineCollectorContext getTimelineEntityContext()
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse putEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities,
org.apache.hadoop.security.UserGroupInformation callerUgi)
throws java.io.IOException
putEntitiesAsync(TimelineEntities, UserGroupInformation).entities - entities to postcallerUgi - the caller UGIjava.io.IOException - if there is any exception encountered while putting
entities.public org.apache.hadoop.yarn.api.records.timelineservice.TimelineWriteResponse putDomain(org.apache.hadoop.yarn.api.records.timelineservice.TimelineDomain domain,
org.apache.hadoop.security.UserGroupInformation callerUgi)
throws java.io.IOException
domain - domain to postcallerUgi - the caller UGIjava.io.IOException - if there is any exception encountered while putting
domain.public void putEntitiesAsync(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities,
org.apache.hadoop.security.UserGroupInformation callerUgi)
throws java.io.IOException
entities - entities to postcallerUgi - the caller UGIjava.io.IOException - if there is any exception encounted while putting
entities.public static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity aggregateEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities entities,
java.lang.String resultEntityId,
java.lang.String resultEntityType,
boolean needsGroupIdInResult)
entities - Entities to aggregateresultEntityId - Id of the result entityresultEntityType - Type of the result entityneedsGroupIdInResult - Marks if we want the aggregation group id in
each aggregated metrics.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.