T - type of the leader gatewaypublic class WebMonitorEndpoint<T extends RestfulGateway> extends RestServerEndpoint implements LeaderContender, JsonArchivist
RestServerEndpoint.RestHandlerUrlComparator| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.flink.configuration.Configuration |
clusterConfiguration |
protected ScheduledExecutorService |
executor |
protected GatewayRetriever<? extends T> |
leaderRetriever |
protected RestHandlerConfiguration |
restConfiguration |
log, responseHeaders, uploadDir| 构造器和说明 |
|---|
WebMonitorEndpoint(GatewayRetriever<? extends T> leaderRetriever,
org.apache.flink.configuration.Configuration clusterConfiguration,
RestHandlerConfiguration restConfiguration,
GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
TransientBlobService transientBlobService,
ScheduledExecutorService executor,
MetricFetcher metricFetcher,
LeaderElectionService leaderElectionService,
ExecutionGraphCache executionGraphCache,
org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler) |
| 限定符和类型 | 方法和说明 |
|---|---|
Collection<ArchivedJson> |
archiveJsonWithPath(ExecutionGraphInfo executionGraphInfo)
Returns a
Collection of ArchivedJsons containing JSON responses and their
respective REST URL for a given job. |
static ScheduledExecutorService |
createExecutorService(int numThreads,
int threadPriority,
String componentName) |
String |
getDescription()
Returns the description of the
LeaderContender for logging purposes. |
void |
grantLeadership(UUID leaderSessionID)
Callback method which is called by the
LeaderElectionService upon selecting this
instance as the new leader. |
void |
handleError(Exception exception)
Callback method which is called by
LeaderElectionService in case of an error in the
service thread. |
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 of
RestServerEndpoint.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) |
void |
revokeLeadership()
Callback method which is called by the
LeaderElectionService upon revoking the
leadership of a former leader. |
protected CompletableFuture<Void> |
shutDownInternal()
Stops this REST server endpoint.
|
void |
startInternal()
Hook to start sub class specific services.
|
closeAsync, getRestBaseUrl, getRestPort, getServerAddress, startprotected final GatewayRetriever<? extends T extends RestfulGateway> leaderRetriever
protected final org.apache.flink.configuration.Configuration clusterConfiguration
protected final RestHandlerConfiguration restConfiguration
protected final ScheduledExecutorService executor
public WebMonitorEndpoint(GatewayRetriever<? extends T> leaderRetriever, org.apache.flink.configuration.Configuration clusterConfiguration, RestHandlerConfiguration restConfiguration, GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever, TransientBlobService transientBlobService, ScheduledExecutorService executor, MetricFetcher metricFetcher, LeaderElectionService leaderElectionService, ExecutionGraphCache executionGraphCache, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler) throws IOException, org.apache.flink.util.ConfigurationException
IOExceptionorg.apache.flink.util.ConfigurationExceptionprotected List<org.apache.flink.api.java.tuple.Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> initializeHandlers(CompletableFuture<String> localAddressFuture)
RestServerEndpointRestServerEndpoint.start() to setup all handlers that the
REST server endpoint implementation requires.initializeHandlers 在类中 RestServerEndpointlocalAddressFuture - future rest address of the RestServerEndpointprotected Collection<org.apache.flink.api.java.tuple.Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> initializeWebSubmissionHandlers(CompletableFuture<String> localAddressFuture)
public void startInternal()
throws Exception
RestServerEndpointstartInternal 在类中 RestServerEndpointException - if an error occurredprotected CompletableFuture<Void> shutDownInternal()
RestServerEndpointshutDownInternal 在类中 RestServerEndpointpublic void grantLeadership(UUID leaderSessionID)
LeaderContenderLeaderElectionService upon selecting this
instance as the new leader. The method is called with the new leader session ID.grantLeadership 在接口中 LeaderContenderleaderSessionID - New leader session IDpublic void revokeLeadership()
LeaderContenderLeaderElectionService upon revoking the
leadership of a former leader. This might happen in case that multiple contenders have been
granted leadership.revokeLeadership 在接口中 LeaderContenderpublic String getDescription()
LeaderContenderLeaderContender for logging purposes.getDescription 在接口中 LeaderContenderpublic void handleError(Exception exception)
LeaderContenderLeaderElectionService in case of an error in the
service thread.handleError 在接口中 LeaderContenderexception - Caught exceptionpublic Collection<ArchivedJson> archiveJsonWithPath(ExecutionGraphInfo executionGraphInfo) throws IOException
JsonArchivistCollection of ArchivedJsons containing JSON responses and their
respective REST URL for a given job.
The collection should contain one entry for every response that could be generated for the given job, for example one entry for each task. The REST URLs should be unique and must not contain placeholders.
archiveJsonWithPath 在接口中 JsonArchivistexecutionGraphInfo - AccessExecutionGraph-related information for which the
responses should be generatedIOException - thrown if the JSON generation failspublic static ScheduledExecutorService createExecutorService(int numThreads, int threadPriority, String componentName)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.