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,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
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) getApplicationAttemptEntities(ApplicationId appId, String fields, Map<String, String> filters, long limit, String fromId) Gets application attempt entities.getApplicationAttemptEntity(ApplicationAttemptId appAttemptId, String fields, Map<String, String> filters) Gets application attempt entity.getApplicationEntity(ApplicationId appId, String fields, Map<String, String> filters) Gets application entity.getContainerEntities(ApplicationId appId, String fields, Map<String, String> filters, long limit, String fromId) Gets container entities for an application.getContainerEntity(ContainerId containerId, String fields, Map<String, String> filters) Gets Timeline entity for the container.protected voidserviceInit(Configuration conf) All initialization code needed by a service.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
Description copied from class:AbstractServiceAll initialization code needed by a service. This method will only ever be called once during the lifecycle of a specific service instance. Implementations do not need to be synchronized as the logic inAbstractService.init(Configuration)prevents re-entrancy. The base implementation checks to see if the subclass has created a new configuration instance, and if so, updates the base class value- Overrides:
serviceInitin classCompositeService- Parameters:
conf- configuration- Throws:
Exception- on a failure -these will be caught, possibly wrapped, and will trigger a service stop
-
getApplicationEntity
public TimelineEntity getApplicationEntity(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 TimelineEntity getApplicationAttemptEntity(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<TimelineEntity> getApplicationAttemptEntities(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 TimelineEntity getContainerEntity(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<TimelineEntity> getContainerEntities(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
-