org.apache.flink.runtime.rest.messages.JobConfigInfo Java Examples
The following examples show how to use
org.apache.flink.runtime.rest.messages.JobConfigInfo.
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: JobConfigHandler.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
public JobConfigHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, JobConfigInfo, JobMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor) { super( leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); }
Example #2
Source File: JobConfigHandler.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private static JobConfigInfo createJobConfigInfo(AccessExecutionGraph executionGraph) { final ArchivedExecutionConfig executionConfig = executionGraph.getArchivedExecutionConfig(); final JobConfigInfo.ExecutionConfigInfo executionConfigInfo; if (executionConfig != null) { executionConfigInfo = new JobConfigInfo.ExecutionConfigInfo( executionConfig.getExecutionMode(), executionConfig.getRestartStrategyDescription(), executionConfig.getParallelism(), executionConfig.getObjectReuseEnabled(), executionConfig.getGlobalJobParameters()); } else { executionConfigInfo = null; } return new JobConfigInfo(executionGraph.getJobID(), executionGraph.getJobName(), executionConfigInfo); }
Example #3
Source File: JobConfigHandler.java From flink with Apache License 2.0 | 6 votes |
public JobConfigHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, JobConfigInfo, JobMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor) { super( leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); }
Example #4
Source File: JobConfigHandler.java From flink with Apache License 2.0 | 6 votes |
private static JobConfigInfo createJobConfigInfo(AccessExecutionGraph executionGraph) { final ArchivedExecutionConfig executionConfig = executionGraph.getArchivedExecutionConfig(); final JobConfigInfo.ExecutionConfigInfo executionConfigInfo; if (executionConfig != null) { executionConfigInfo = new JobConfigInfo.ExecutionConfigInfo( executionConfig.getExecutionMode(), executionConfig.getRestartStrategyDescription(), executionConfig.getParallelism(), executionConfig.getObjectReuseEnabled(), executionConfig.getGlobalJobParameters()); } else { executionConfigInfo = null; } return new JobConfigInfo(executionGraph.getJobID(), executionGraph.getJobName(), executionConfigInfo); }
Example #5
Source File: JobConfigHandler.java From flink with Apache License 2.0 | 6 votes |
public JobConfigHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, JobConfigInfo, JobMessageParameters> messageHeaders, ExecutionGraphCache executionGraphCache, Executor executor) { super( leaderRetriever, timeout, responseHeaders, messageHeaders, executionGraphCache, executor); }
Example #6
Source File: JobConfigHandler.java From flink with Apache License 2.0 | 5 votes |
private static JobConfigInfo createJobConfigInfo(AccessExecutionGraph executionGraph) { final ArchivedExecutionConfig executionConfig = executionGraph.getArchivedExecutionConfig(); final JobConfigInfo.ExecutionConfigInfo executionConfigInfo; if (executionConfig != null) { executionConfigInfo = JobConfigInfo.ExecutionConfigInfo.from(executionConfig); } else { executionConfigInfo = null; } return new JobConfigInfo(executionGraph.getJobID(), executionGraph.getJobName(), executionConfigInfo); }
Example #7
Source File: JobConfigHandlerTest.java From flink with Apache License 2.0 | 5 votes |
@Test public void handleRequest_executionConfigWithSecretValues_excludesSecretValuesFromResponse() throws HandlerRequestException { final JobConfigHandler jobConfigHandler = new JobConfigHandler( () -> null, TestingUtils.TIMEOUT(), Collections.emptyMap(), JobConfigHeaders.getInstance(), new DefaultExecutionGraphCache(TestingUtils.TIMEOUT(), TestingUtils.TIMEOUT()), TestingUtils.defaultExecutor()); final Map<String, String> globalJobParameters = new HashMap<>(); globalJobParameters.put("foobar", "barfoo"); globalJobParameters.put("bar.secret.foo", "my secret"); globalJobParameters.put("password.to.my.safe", "12345"); final ArchivedExecutionConfig archivedExecutionConfig = new ArchivedExecutionConfigBuilder() .setGlobalJobParameters(globalJobParameters) .build(); final AccessExecutionGraph archivedExecutionGraph = new ArchivedExecutionGraphBuilder() .setArchivedExecutionConfig(archivedExecutionConfig) .build(); final HandlerRequest<EmptyRequestBody, JobMessageParameters> handlerRequest = createRequest(archivedExecutionGraph.getJobID()); final JobConfigInfo jobConfigInfoResponse = jobConfigHandler.handleRequest(handlerRequest, archivedExecutionGraph); final Map<String, String> filteredGlobalJobParameters = filterSecretValues(globalJobParameters); assertThat(jobConfigInfoResponse.getExecutionConfigInfo().getGlobalJobParameters(), is(equalTo(filteredGlobalJobParameters))); }
Example #8
Source File: JobConfigHandler.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected JobConfigInfo handleRequest(HandlerRequest<EmptyRequestBody, JobMessageParameters> request, AccessExecutionGraph executionGraph) { return createJobConfigInfo(executionGraph); }
Example #9
Source File: JobConfigHandler.java From flink with Apache License 2.0 | 4 votes |
@Override protected JobConfigInfo handleRequest(HandlerRequest<EmptyRequestBody, JobMessageParameters> request, AccessExecutionGraph executionGraph) { return createJobConfigInfo(executionGraph); }
Example #10
Source File: JobConfigHandler.java From flink with Apache License 2.0 | 4 votes |
@Override protected JobConfigInfo handleRequest(HandlerRequest<EmptyRequestBody, JobMessageParameters> request, AccessExecutionGraph executionGraph) { return createJobConfigInfo(executionGraph); }