Class TimelineReaderClient
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.client.api.TimelineReaderClient
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
- Direct Known Subclasses:
TimelineReaderClientImpl
@Public
@Evolving
public abstract class TimelineReaderClient
extends org.apache.hadoop.service.CompositeService
A client library that can be used to get Timeline Entities associated with
application, application attempt or containers. This client library needs to
be used along with time line v.2 server version.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService
org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHookNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TimelineReaderClientCreate a new instance of Timeline Reader Client.abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity>getApplicationAttemptEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String, String> filters, long limit, String fromId) Gets application attempt entities.abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntitygetApplicationAttemptEntity(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String fields, Map<String, String> filters) Gets application attempt entity.abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntitygetApplicationEntity(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String, String> filters) Gets application entity.abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity>getContainerEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String, String> filters, long limit, String fromId) Gets container entities for an application.abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntitygetContainerEntity(org.apache.hadoop.yarn.api.records.ContainerId containerId, String fields, Map<String, String> filters) Gets Timeline entity for the container.Methods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService, serviceInit, serviceStart, serviceStopMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Constructor Details
-
TimelineReaderClient
-
-
Method Details
-
createTimelineReaderClient
Create a new instance of Timeline Reader Client.- Returns:
- instance of Timeline Reader Client.
-
getApplicationEntity
public abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getApplicationEntity(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String, String> filters) throws IOExceptionGets application entity.- Parameters:
appId- application idfields- Fields to be fetched. Defaults to INFO.filters- Filters to be applied while fetching entities.- Returns:
- entity of the application
- Throws:
IOException- io error occur.
-
getApplicationAttemptEntity
public abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getApplicationAttemptEntity(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String fields, Map<String, String> filters) throws IOExceptionGets application attempt entity.- Parameters:
appAttemptId- application attempt idfields- Fields to be fetched. Defaults to INFO.filters- Filters to be applied while fetching entities.- Returns:
- entity associated with application attempt
- Throws:
IOException- io error occur.
-
getApplicationAttemptEntities
public abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity> getApplicationAttemptEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String, String> filters, long limit, String fromId) throws IOExceptionGets application attempt entities.- Parameters:
appId- application idfields- Fields to be fetched. Defaults to INFO.filters- Filters to be applied while fetching entities.limit- Number of entities to return.fromId- Retrieve next set of generic ids from given fromId- Returns:
- list of application attempt entities
- Throws:
IOException- io error occur.
-
getContainerEntity
public abstract org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getContainerEntity(org.apache.hadoop.yarn.api.records.ContainerId containerId, String fields, Map<String, String> filters) throws IOExceptionGets Timeline entity for the container.- Parameters:
containerId- container idfields- Fields to be fetched. Defaults to INFO.filters- Filters to be applied while fetching entities.- Returns:
- timeline entity for container
- Throws:
IOException- io error occur.
-
getContainerEntities
public abstract List<org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity> getContainerEntities(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String, String> filters, long limit, String fromId) throws IOExceptionGets container entities for an application.- Parameters:
appId- application idfields- Fields to be fetched. Defaults to INFO.filters- Filters to be applied while fetching entities.limit- Number of entities to return.fromId- Retrieve next set of generic ids from given fromId- Returns:
- list of entities
- Throws:
IOException- io error occur.
-