org.apache.flink.runtime.webmonitor.retriever.LeaderGatewayRetriever Java Examples

The following examples show how to use org.apache.flink.runtime.webmonitor.retriever.LeaderGatewayRetriever. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RestEndpointFactory.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
WebMonitorEndpoint<T> createRestEndpoint(
Configuration configuration,
LeaderGatewayRetriever<DispatcherGateway> dispatcherGatewayRetriever,
LeaderGatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
TransientBlobService transientBlobService,
ExecutorService executor,
MetricFetcher metricFetcher,
LeaderElectionService leaderElectionService,
FatalErrorHandler fatalErrorHandler) throws Exception;
 
Example #2
Source File: RestEndpointFactory.java    From flink with Apache License 2.0 5 votes vote down vote up
WebMonitorEndpoint<T> createRestEndpoint(
Configuration configuration,
LeaderGatewayRetriever<DispatcherGateway> dispatcherGatewayRetriever,
LeaderGatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
TransientBlobService transientBlobService,
ExecutorService executor,
MetricFetcher metricFetcher,
LeaderElectionService leaderElectionService,
FatalErrorHandler fatalErrorHandler) throws Exception;
 
Example #3
Source File: RestEndpointFactory.java    From flink with Apache License 2.0 5 votes vote down vote up
WebMonitorEndpoint<T> createRestEndpoint(
Configuration configuration,
LeaderGatewayRetriever<DispatcherGateway> dispatcherGatewayRetriever,
LeaderGatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
TransientBlobService transientBlobService,
ScheduledExecutorService executor,
MetricFetcher metricFetcher,
LeaderElectionService leaderElectionService,
FatalErrorHandler fatalErrorHandler) throws Exception;
 
Example #4
Source File: JobVertexWatermarksHandlerTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Before
public void before() throws Exception {
	taskMetricStore = Mockito.mock(MetricStore.TaskMetricStore.class);

	MetricStore metricStore = Mockito.mock(MetricStore.class);
	Mockito.when(metricStore.getTaskMetricStore(TEST_JOB_ID.toString(), TEST_VERTEX_ID.toString()))
		.thenReturn(taskMetricStore);

	metricFetcher = Mockito.mock(MetricFetcher.class);
	Mockito.when(metricFetcher.getMetricStore()).thenReturn(metricStore);

	watermarkHandler = new JobVertexWatermarksHandler(
		Mockito.mock(LeaderGatewayRetriever.class),
		Time.seconds(1),
		Collections.emptyMap(),
		metricFetcher,
		NoOpExecutionGraphCache.INSTANCE,
		Mockito.mock(Executor.class));

	final Map<String, String> pathParameters = new HashMap<>();
	pathParameters.put(JobIDPathParameter.KEY, TEST_JOB_ID.toString());
	pathParameters.put(JobVertexIdPathParameter.KEY, TEST_VERTEX_ID.toString());

	request = new HandlerRequest<>(EmptyRequestBody.getInstance(), new JobVertexMessageParameters(),
			pathParameters, Collections.emptyMap());

	vertex = Mockito.mock(AccessExecutionJobVertex.class);
	Mockito.when(vertex.getJobVertexId()).thenReturn(TEST_VERTEX_ID);

	AccessExecutionVertex firstTask = Mockito.mock(AccessExecutionVertex.class);
	AccessExecutionVertex secondTask = Mockito.mock(AccessExecutionVertex.class);
	Mockito.when(firstTask.getParallelSubtaskIndex()).thenReturn(0);
	Mockito.when(secondTask.getParallelSubtaskIndex()).thenReturn(1);

	AccessExecutionVertex[] accessExecutionVertices = {firstTask, secondTask};
	Mockito.when(vertex.getTaskVertices()).thenReturn(accessExecutionVertices);
}