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

The following examples show how to use org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever. 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: CheckpointStatisticDetailsHandler.java    From flink with Apache License 2.0 6 votes vote down vote up
public CheckpointStatisticDetailsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, CheckpointStatistics, CheckpointMessageParameters> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor,
		CheckpointStatsCache checkpointStatsCache) {
	super(
		leaderRetriever,
		timeout,
		responseHeaders,
		messageHeaders,
		executionGraphCache,
		executor,
		checkpointStatsCache);
}
 
Example #2
Source File: JobVertexDetailsHandler.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
public JobVertexDetailsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, JobVertexDetailsInfo, JobVertexMessageParameters> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor,
		MetricFetcher metricFetcher) {
	super(
		leaderRetriever,
		timeout,
		responseHeaders,
		messageHeaders,
		executionGraphCache,
		executor);
	this.metricFetcher = metricFetcher;
}
 
Example #3
Source File: JobPlanHandler.java    From flink with Apache License 2.0 6 votes vote down vote up
public JobPlanHandler(
	GatewayRetriever<? extends RestfulGateway> leaderRetriever,
	Time timeout,
	Map<String, String> headers,
	MessageHeaders<EmptyRequestBody, JobPlanInfo, JobMessageParameters> messageHeaders,
	ExecutionGraphCache executionGraphCache,
	Executor executor) {

	super(
		leaderRetriever,
		timeout,
		headers,
		messageHeaders,
		executionGraphCache,
		executor);
}
 
Example #4
Source File: DispatcherRestEndpoint.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
public DispatcherRestEndpoint(
		RestServerEndpointConfiguration endpointConfiguration,
		GatewayRetriever<DispatcherGateway> leaderRetriever,
		Configuration clusterConfiguration,
		RestHandlerConfiguration restConfiguration,
		GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
		TransientBlobService transientBlobService,
		ExecutorService executor,
		MetricFetcher metricFetcher,
		LeaderElectionService leaderElectionService,
		FatalErrorHandler fatalErrorHandler) throws IOException {

	super(
		endpointConfiguration,
		leaderRetriever,
		clusterConfiguration,
		restConfiguration,
		resourceManagerRetriever,
		transientBlobService,
		executor,
		metricFetcher,
		leaderElectionService,
		fatalErrorHandler);

	webSubmissionExtension = WebMonitorExtension.empty();
}
 
Example #5
Source File: JarRunHandlerParameterTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setup() throws Exception {
	init();
	final GatewayRetriever<TestingDispatcherGateway> gatewayRetriever = () -> CompletableFuture.completedFuture(restfulGateway);
	final Time timeout = Time.seconds(10);
	final Map<String, String> responseHeaders = Collections.emptyMap();
	final Executor executor = TestingUtils.defaultExecutor();

	handler = new JarRunHandler(
		gatewayRetriever,
		timeout,
		responseHeaders,
		JarRunHeaders.getInstance(),
		jarDir,
		new Configuration(),
		executor);
}
 
Example #6
Source File: JarRunHandlerParameterTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setup() throws Exception {
	init();
	final GatewayRetriever<TestingDispatcherGateway> gatewayRetriever = () -> CompletableFuture.completedFuture(restfulGateway);
	final Time timeout = Time.seconds(10);
	final Map<String, String> responseHeaders = Collections.emptyMap();
	final Executor executor = TestingUtils.defaultExecutor();

	handler = new JarRunHandler(
		gatewayRetriever,
		timeout,
		responseHeaders,
		JarRunHeaders.getInstance(),
		jarDir,
		new Configuration(),
		executor);
}
 
Example #7
Source File: MiniDispatcherRestEndpoint.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
public MiniDispatcherRestEndpoint(
		RestServerEndpointConfiguration endpointConfiguration,
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Configuration clusterConfiguration,
		RestHandlerConfiguration restConfiguration,
		GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
		TransientBlobService transientBlobService,
		ExecutorService executor,
		MetricFetcher metricFetcher,
		LeaderElectionService leaderElectionService,
		FatalErrorHandler fatalErrorHandler) throws IOException {
	super(
		endpointConfiguration,
		leaderRetriever,
		clusterConfiguration,
		restConfiguration,
		resourceManagerRetriever,
		transientBlobService,
		executor,
		metricFetcher,
		leaderElectionService,
		fatalErrorHandler);
}
 
Example #8
Source File: AggregatingMetricsHandlerTestBase.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
	MetricFetcher fetcher = new MetricFetcherImpl<RestfulGateway>(
		mock(GatewayRetriever.class),
		mock(MetricQueryServiceRetriever.class),
		Executors.directExecutor(),
		TestingUtils.TIMEOUT(),
		MetricOptions.METRIC_FETCHER_UPDATE_INTERVAL.defaultValue());
	store = fetcher.getMetricStore();

	Collection<MetricDump> metricDumps = getMetricDumps();
	for (MetricDump dump : metricDumps) {
		store.add(dump);
	}

	handler = getHandler(
		LEADER_RETRIEVER,
		TIMEOUT,
		TEST_HEADERS,
		EXECUTOR,
		fetcher);
	pathParameters = getPathParameters();
}
 
Example #9
Source File: JobExceptionsHandler.java    From flink with Apache License 2.0 6 votes vote down vote up
public JobExceptionsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, JobExceptionsInfo, JobMessageParameters> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor) {

	super(
		leaderRetriever,
		timeout,
		responseHeaders,
		messageHeaders,
		executionGraphCache,
		executor);
}
 
Example #10
Source File: JobVertexDetailsHandler.java    From flink with Apache License 2.0 6 votes vote down vote up
public JobVertexDetailsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, JobVertexDetailsInfo, JobVertexMessageParameters> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor,
		MetricFetcher metricFetcher) {
	super(
		leaderRetriever,
		timeout,
		responseHeaders,
		messageHeaders,
		executionGraphCache,
		executor);
	this.metricFetcher = metricFetcher;
}
 
Example #11
Source File: AbstractJobVertexHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Instantiates a new Abstract job vertex handler.
 *
 * @param leaderRetriever     the leader retriever
 * @param timeout             the timeout
 * @param responseHeaders     the response headers
 * @param messageHeaders      the message headers
 * @param executionGraphCache the execution graph cache
 * @param executor            the executor
 */
protected AbstractJobVertexHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, R, M> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor) {

	super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor);
}
 
Example #12
Source File: DashboardConfigHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public DashboardConfigHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, DashboardConfiguration, EmptyMessageParameters> messageHeaders,
		long refreshInterval) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders);

	dashboardConfiguration = DashboardConfiguration.from(refreshInterval, ZonedDateTime.now());
}
 
Example #13
Source File: AggregatingTaskManagersMetricsHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
public AggregatingTaskManagersMetricsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout, Map<String, String> responseHeaders,
		Executor executor,
		MetricFetcher fetcher) {
	super(leaderRetriever, timeout, responseHeaders, AggregatedTaskManagerMetricsHeaders.getInstance(), executor, fetcher);
}
 
Example #14
Source File: AbstractRestHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
protected AbstractRestHandler(
		GatewayRetriever<? extends T> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<R, P, M> messageHeaders) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders);
	this.messageHeaders = Preconditions.checkNotNull(messageHeaders);
}
 
Example #15
Source File: StaticFileServerHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
public StaticFileServerHandler(
		GatewayRetriever<? extends T> retriever,
		Time timeout,
		File rootPath) throws IOException {

	super(retriever, timeout, Collections.emptyMap());

	this.rootPath = checkNotNull(rootPath).getCanonicalFile();
}
 
Example #16
Source File: AbstractAsynchronousOperationHandlers.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
protected StatusHandler(
		GatewayRetriever<? extends T> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, AsynchronousOperationResult<V>, M> messageHeaders) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders);
}
 
Example #17
Source File: StaticFileServerHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public StaticFileServerHandler(
		GatewayRetriever<? extends T> retriever,
		Time timeout,
		File rootPath) throws IOException {

	super(retriever, timeout, Collections.emptyMap());

	this.rootPath = checkNotNull(rootPath).getCanonicalFile();
}
 
Example #18
Source File: AbstractAsynchronousOperationHandlers.java    From flink with Apache License 2.0 5 votes vote down vote up
protected TriggerHandler(
		GatewayRetriever<? extends T> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<B, TriggerResponse, M> messageHeaders) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders);
}
 
Example #19
Source File: StandaloneDispatcher.java    From flink with Apache License 2.0 5 votes vote down vote up
public StandaloneDispatcher(
		RpcService rpcService,
		String endpointId,
		Configuration configuration,
		HighAvailabilityServices highAvailabilityServices,
		GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
		BlobServer blobServer,
		HeartbeatServices heartbeatServices,
		JobManagerMetricGroup jobManagerMetricGroup,
		@Nullable String metricQueryServiceAddress,
		ArchivedExecutionGraphStore archivedExecutionGraphStore,
		JobManagerRunnerFactory jobManagerRunnerFactory,
		FatalErrorHandler fatalErrorHandler,
		HistoryServerArchivist historyServerArchivist) throws Exception {
	super(
		rpcService,
		endpointId,
		configuration,
		highAvailabilityServices,
		highAvailabilityServices.getSubmittedJobGraphStore(),
		resourceManagerGatewayRetriever,
		blobServer,
		heartbeatServices,
		jobManagerMetricGroup,
		metricQueryServiceAddress,
		archivedExecutionGraphStore,
		jobManagerRunnerFactory,
		fatalErrorHandler,
		historyServerArchivist);
}
 
Example #20
Source File: JobVertexAccumulatorsHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public JobVertexAccumulatorsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, JobVertexAccumulatorsInfo, JobVertexMessageParameters> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor) {
	super(
		leaderRetriever,
		timeout,
		responseHeaders,
		messageHeaders,
		executionGraphCache,
		executor);
}
 
Example #21
Source File: SavepointDisposalHandlers.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public SavepointDisposalTriggerHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders) {
	super(
		leaderRetriever,
		timeout,
		responseHeaders,
		SavepointDisposalTriggerHeaders.getInstance());
}
 
Example #22
Source File: JobMetricsHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
public JobMetricsHandler(
		final GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		final Time timeout,
		final Map<String, String> headers,
		final MetricFetcher metricFetcher) {
	super(leaderRetriever, timeout, headers, JobMetricsHeaders.getInstance(), metricFetcher);
}
 
Example #23
Source File: CheckpointConfigHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public CheckpointConfigHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, CheckpointConfigInfo, JobMessageParameters> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor) {
	super(
		leaderRetriever,
		timeout,
		responseHeaders,
		messageHeaders,
		executionGraphCache,
		executor);
}
 
Example #24
Source File: AbstractMetricsHandlerTest.java    From flink with Apache License 2.0 5 votes vote down vote up
private TestMetricsHandler(
	GatewayRetriever<DispatcherGateway> leaderRetriever,
	Time timeout,
	Map<String, String> headers,
	MessageHeaders<EmptyRequestBody,
		MetricCollectionResponseBody,
		TestMessageParameters> messageHeaders,
	MetricFetcher metricFetcher) {

	super(leaderRetriever, timeout, headers, messageHeaders, metricFetcher);
}
 
Example #25
Source File: TaskManagerStdoutFileHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
public TaskManagerStdoutFileHandler(
		@Nonnull GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		@Nonnull Time timeout,
		@Nonnull Map<String, String> responseHeaders,
		@Nonnull UntypedResponseMessageHeaders<EmptyRequestBody, TaskManagerMessageParameters> untypedResponseMessageHeaders,
		@Nonnull GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
		@Nonnull TransientBlobService transientBlobService,
		@Nonnull Time cacheEntryDuration) {
	super(leaderRetriever, timeout, responseHeaders, untypedResponseMessageHeaders, resourceManagerGatewayRetriever, transientBlobService, cacheEntryDuration);
}
 
Example #26
Source File: CheckpointingStatisticsHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public CheckpointingStatisticsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, CheckpointingStatistics, JobMessageParameters> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor);
}
 
Example #27
Source File: AbstractExecutionGraphHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
protected AbstractExecutionGraphHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> responseHeaders,
		MessageHeaders<EmptyRequestBody, R, M> messageHeaders,
		ExecutionGraphCache executionGraphCache,
		Executor executor) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders);

	this.executionGraphCache = Preconditions.checkNotNull(executionGraphCache);
	this.executor = Preconditions.checkNotNull(executor);
}
 
Example #28
Source File: JarRunHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
public JarRunHandler(
		final GatewayRetriever<? extends DispatcherGateway> leaderRetriever,
		final Time timeout,
		final Map<String, String> responseHeaders,
		final MessageHeaders<JarRunRequestBody, JarRunResponseBody, JarRunMessageParameters> messageHeaders,
		final Path jarDir,
		final Configuration configuration,
		final Executor executor) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders);

	this.jarDir = requireNonNull(jarDir);
	this.configuration = requireNonNull(configuration);
	this.executor = requireNonNull(executor);
}
 
Example #29
Source File: JobVertexMetricsHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public JobVertexMetricsHandler(
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Time timeout,
		Map<String, String> headers,
		MetricFetcher metricFetcher) {

	super(leaderRetriever, timeout, headers, JobVertexMetricsHeaders.getInstance(), metricFetcher);
}
 
Example #30
Source File: JarPlanHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public JarPlanHandler(
		final GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		final Time timeout,
		final Map<String, String> responseHeaders,
		final MessageHeaders<JarPlanRequestBody, JobPlanInfo, JarPlanMessageParameters> messageHeaders,
		final Path jarDir,
		final Configuration configuration,
		final Executor executor,
		final Function<JobGraph, JobPlanInfo> planGenerator) {
	super(leaderRetriever, timeout, responseHeaders, messageHeaders);
	this.jarDir = requireNonNull(jarDir);
	this.configuration = requireNonNull(configuration);
	this.executor = requireNonNull(executor);
	this.planGenerator = planGenerator;
}