Interface ClientRequestInterceptor
- All Superinterfaces:
org.apache.hadoop.yarn.api.ApplicationBaseProtocol,org.apache.hadoop.yarn.api.ApplicationClientProtocol,org.apache.hadoop.conf.Configurable
- All Known Implementing Classes:
AbstractClientRequestInterceptor,ApplicationSubmissionContextInterceptor,DefaultClientRequestInterceptor,FederationClientInterceptor,PassThroughClientRequestInterceptor
public interface ClientRequestInterceptor
extends org.apache.hadoop.yarn.api.ApplicationClientProtocol, org.apache.hadoop.conf.Configurable
Defines the contract to be implemented by the request interceptor classes,
that can be used to intercept and inspect messages sent from the client to
the resource manager.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the next interceptor in the chain.Get RouterDelegationTokenSecretManager.voidThis method is called for initializing the interceptor.voidsetNextInterceptor(ClientRequestInterceptor nextInterceptor) Sets the next interceptor in the pipeline.voidsetTokenSecretManager(RouterDelegationTokenSecretManager tokenSecretManager) Set RouterDelegationTokenSecretManager for specific interceptor to support Token operations, including create Token, update Token, and delete Token.voidshutdown()This method is called to release the resources held by the interceptor.Methods inherited from interface org.apache.hadoop.yarn.api.ApplicationBaseProtocol
cancelDelegationToken, getApplicationAttemptReport, getApplicationAttempts, getApplicationReport, getApplications, getContainerReport, getContainers, getDelegationToken, renewDelegationTokenMethods inherited from interface org.apache.hadoop.yarn.api.ApplicationClientProtocol
deleteReservation, failApplicationAttempt, forceKillApplication, getAttributesToNodes, getClusterMetrics, getClusterNodeAttributes, getClusterNodeLabels, getClusterNodes, getLabelsToNodes, getNewApplication, getNewReservation, getNodesToAttributes, getNodeToLabels, getQueueInfo, getQueueUserAcls, getResourceProfile, getResourceProfiles, getResourceTypeInfo, listReservations, moveApplicationAcrossQueues, signalToContainer, submitApplication, submitReservation, updateApplicationPriority, updateApplicationTimeouts, updateReservationMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Method Details
-
init
This method is called for initializing the interceptor. This is guaranteed to be called only once in the lifetime of this instance.- Parameters:
user- the name of the client
-
shutdown
void shutdown()This method is called to release the resources held by the interceptor. This will be called when the application pipeline is being destroyed. The concrete implementations should dispose the resources and forward the request to the next interceptor, if any. -
setNextInterceptor
Sets the next interceptor in the pipeline. The concrete implementation of this interface should always pass the request to the nextInterceptor after inspecting the message. The last interceptor in the chain is responsible to send the messages to the resource manager service and so the last interceptor will not receive this method call.- Parameters:
nextInterceptor- the ClientRequestInterceptor to set in the pipeline
-
getNextInterceptor
ClientRequestInterceptor getNextInterceptor()Returns the next interceptor in the chain.- Returns:
- the next interceptor in the chain
-
setTokenSecretManager
Set RouterDelegationTokenSecretManager for specific interceptor to support Token operations, including create Token, update Token, and delete Token.- Parameters:
tokenSecretManager- Router DelegationTokenSecretManager
-
getTokenSecretManager
RouterDelegationTokenSecretManager getTokenSecretManager()Get RouterDelegationTokenSecretManager.- Returns:
- Router DelegationTokenSecretManager.
-