Class TimelineReaderClientImpl
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.client.api.TimelineReaderClient
org.apache.hadoop.yarn.client.api.impl.TimelineReaderClientImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
Implementation of TimelineReaderClient interface.
-
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 TypeMethodDescriptionprotected javax.ws.rs.core.Responseprotected StringencodeValue(String value) 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.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.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.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.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.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) Methods inherited from class org.apache.hadoop.yarn.client.api.TimelineReaderClient
createTimelineReaderClientMethods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeService, 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
-
TimelineReaderClientImpl
public TimelineReaderClientImpl()
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
getApplicationEntity
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getApplicationEntity(org.apache.hadoop.yarn.api.records.ApplicationId appId, String fields, Map<String, String> filters) throws IOExceptionDescription copied from class:TimelineReaderClientGets application entity.- Specified by:
getApplicationEntityin classTimelineReaderClient- 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 org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getApplicationAttemptEntity(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String fields, Map<String, String> filters) throws IOExceptionDescription copied from class:TimelineReaderClientGets application attempt entity.- Specified by:
getApplicationAttemptEntityin classTimelineReaderClient- 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 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 IOExceptionDescription copied from class:TimelineReaderClientGets application attempt entities.- Specified by:
getApplicationAttemptEntitiesin classTimelineReaderClient- 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 org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity getContainerEntity(org.apache.hadoop.yarn.api.records.ContainerId containerId, String fields, Map<String, String> filters) throws IOExceptionDescription copied from class:TimelineReaderClientGets Timeline entity for the container.- Specified by:
getContainerEntityin classTimelineReaderClient- 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 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 IOExceptionDescription copied from class:TimelineReaderClientGets container entities for an application.- Specified by:
getContainerEntitiesin classTimelineReaderClient- 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.
-
encodeValue
- Throws:
UnsupportedEncodingException
-
doGetUri
@VisibleForTesting protected javax.ws.rs.core.Response doGetUri(URI base, String path, javax.ws.rs.core.MultivaluedMap<String, String> params) throws IOException- Throws:
IOException
-