Class DispatcherRestEndpoint
- java.lang.Object
-
- org.apache.flink.runtime.rest.RestServerEndpoint
-
- org.apache.flink.runtime.webmonitor.WebMonitorEndpoint<DispatcherGateway>
-
- org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint
-
- All Implemented Interfaces:
AutoCloseable,LeaderContender,RestService,JsonArchivist,org.apache.flink.util.AutoCloseableAsync
public class DispatcherRestEndpoint extends WebMonitorEndpoint<DispatcherGateway>
REST endpoint for theDispatchercomponent.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.rest.RestServerEndpoint
RestServerEndpoint.RestHandlerUrlComparator
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.webmonitor.WebMonitorEndpoint
clusterConfiguration, executor, leaderRetriever, restConfiguration
-
Fields inherited from class org.apache.flink.runtime.rest.RestServerEndpoint
log, responseHeaders, uploadDir
-
-
Constructor Summary
Constructors Constructor Description DispatcherRestEndpoint(GatewayRetriever<DispatcherGateway> leaderRetriever, org.apache.flink.configuration.Configuration clusterConfiguration, RestHandlerConfiguration restConfiguration, GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever, TransientBlobService transientBlobService, ScheduledExecutorService executor, MetricFetcher metricFetcher, LeaderElection leaderElection, ExecutionGraphCache executionGraphCache, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<org.apache.flink.api.java.tuple.Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>>initializeHandlers(CompletableFuture<String> localAddressFuture)This method is called at the beginning ofRestServerEndpoint.start()to setup all handlers that the REST server endpoint implementation requires.protected Collection<org.apache.flink.api.java.tuple.Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>>initializeWebSubmissionHandlers(CompletableFuture<String> localAddressFuture)protected CompletableFuture<Void>shutDownInternal()Stops this REST server endpoint.-
Methods inherited from class org.apache.flink.runtime.webmonitor.WebMonitorEndpoint
archiveJsonWithPath, createExecutorService, grantLeadership, handleError, revokeLeadership, startInternal
-
Methods inherited from class org.apache.flink.runtime.rest.RestServerEndpoint
closeAsync, getRestBaseUrl, getRestPort, getServerAddress, start
-
-
-
-
Constructor Detail
-
DispatcherRestEndpoint
public DispatcherRestEndpoint(GatewayRetriever<DispatcherGateway> leaderRetriever, org.apache.flink.configuration.Configuration clusterConfiguration, RestHandlerConfiguration restConfiguration, GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever, TransientBlobService transientBlobService, ScheduledExecutorService executor, MetricFetcher metricFetcher, LeaderElection leaderElection, ExecutionGraphCache executionGraphCache, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler) throws IOException, org.apache.flink.util.ConfigurationException
- Throws:
IOExceptionorg.apache.flink.util.ConfigurationException
-
-
Method Detail
-
initializeHandlers
protected List<org.apache.flink.api.java.tuple.Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> initializeHandlers(CompletableFuture<String> localAddressFuture)
Description copied from class:RestServerEndpointThis method is called at the beginning ofRestServerEndpoint.start()to setup all handlers that the REST server endpoint implementation requires.- Overrides:
initializeHandlersin classWebMonitorEndpoint<DispatcherGateway>- Parameters:
localAddressFuture- future rest address of the RestServerEndpoint- Returns:
- Collection of AbstractRestHandler which are added to the server endpoint
-
initializeWebSubmissionHandlers
protected Collection<org.apache.flink.api.java.tuple.Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> initializeWebSubmissionHandlers(CompletableFuture<String> localAddressFuture)
- Overrides:
initializeWebSubmissionHandlersin classWebMonitorEndpoint<DispatcherGateway>
-
shutDownInternal
protected CompletableFuture<Void> shutDownInternal()
Description copied from class:RestServerEndpointStops this REST server endpoint.- Overrides:
shutDownInternalin classWebMonitorEndpoint<DispatcherGateway>- Returns:
- Future which is completed once the shut down has been finished.
-
-