org.apache.flink.runtime.messages.webmonitor.JobIdsWithStatusOverview Java Examples
The following examples show how to use
org.apache.flink.runtime.messages.webmonitor.JobIdsWithStatusOverview.
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: JobIdsHandler.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override protected CompletableFuture<JobIdsWithStatusOverview> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, EmptyMessageParameters> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { return gateway.requestMultipleJobDetails(timeout).thenApply( multipleJobDetails -> new JobIdsWithStatusOverview( multipleJobDetails .getJobs() .stream() .map( jobDetails -> new JobIdsWithStatusOverview.JobIdWithStatus( jobDetails.getJobId(), jobDetails.getStatus())) .collect(Collectors.toList()) ) ); }
Example #2
Source File: WebMonitorMessagesTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Test public void testStatusMessages() { try { final Random rnd = new Random(); GenericMessageTester.testMessageInstance(RequestJobsOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestJobsWithIDsOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestStatusOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestJobsOverview.getInstance()); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(RequestJobDetails.class, rnd)); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(ClusterOverview.class, rnd)); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(JobsOverview.class, rnd)); GenericMessageTester.testMessageInstance(new JobIdsWithStatusOverview(Arrays.asList( new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.RUNNING), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.CANCELED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.CREATED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.FAILED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.RESTARTING)))); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
Example #3
Source File: JobIdsHandler.java From flink with Apache License 2.0 | 6 votes |
@Override protected CompletableFuture<JobIdsWithStatusOverview> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, EmptyMessageParameters> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { return gateway.requestMultipleJobDetails(timeout).thenApply( multipleJobDetails -> new JobIdsWithStatusOverview( multipleJobDetails .getJobs() .stream() .map( jobDetails -> new JobIdsWithStatusOverview.JobIdWithStatus( jobDetails.getJobId(), jobDetails.getStatus())) .collect(Collectors.toList()) ) ); }
Example #4
Source File: WebMonitorMessagesTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testStatusMessages() { try { final Random rnd = new Random(); GenericMessageTester.testMessageInstance(RequestJobsOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestJobsWithIDsOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestStatusOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestJobsOverview.getInstance()); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(RequestJobDetails.class, rnd)); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(ClusterOverview.class, rnd)); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(JobsOverview.class, rnd)); GenericMessageTester.testMessageInstance(new JobIdsWithStatusOverview(Arrays.asList( new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.RUNNING), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.CANCELED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.CREATED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.FAILED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.RESTARTING)))); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
Example #5
Source File: JobIdsHandler.java From flink with Apache License 2.0 | 6 votes |
@Override protected CompletableFuture<JobIdsWithStatusOverview> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, EmptyMessageParameters> request, @Nonnull RestfulGateway gateway) throws RestHandlerException { return gateway.requestMultipleJobDetails(timeout).thenApply( multipleJobDetails -> new JobIdsWithStatusOverview( multipleJobDetails .getJobs() .stream() .map( jobDetails -> new JobIdsWithStatusOverview.JobIdWithStatus( jobDetails.getJobId(), jobDetails.getStatus())) .collect(Collectors.toList()) ) ); }
Example #6
Source File: WebMonitorMessagesTest.java From flink with Apache License 2.0 | 6 votes |
@Test public void testStatusMessages() { try { final Random rnd = new Random(); GenericMessageTester.testMessageInstance(RequestJobsOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestJobsWithIDsOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestStatusOverview.getInstance()); GenericMessageTester.testMessageInstance(RequestJobsOverview.getInstance()); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(RequestJobDetails.class, rnd)); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(ClusterOverview.class, rnd)); GenericMessageTester.testMessageInstance(GenericMessageTester.instantiateGeneric(JobsOverview.class, rnd)); GenericMessageTester.testMessageInstance(new JobIdsWithStatusOverview(Arrays.asList( new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.RUNNING), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.CANCELED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.CREATED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.FAILED), new JobIdsWithStatusOverview.JobIdWithStatus(JobID.generate(), JobStatus.RESTARTING)))); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
Example #7
Source File: JobIdsHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public JobIdsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, JobIdsWithStatusOverview, EmptyMessageParameters> messageHeaders) { super( leaderRetriever, timeout, responseHeaders, messageHeaders); }
Example #8
Source File: BatchFineGrainedRecoveryITCase.java From flink with Apache License 2.0 | 5 votes |
private Collection<JobID> getJobs() { JobIdsWithStatusOverview jobIds = sendRequest( JobIdsWithStatusesOverviewHeaders.getInstance(), EmptyMessageParameters.getInstance()) .join(); return jobIds .getJobsWithStatus() .stream() .map(JobIdWithStatus::getJobId) .collect(Collectors.toList()); }
Example #9
Source File: JobIdsHandler.java From flink with Apache License 2.0 | 5 votes |
public JobIdsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, JobIdsWithStatusOverview, EmptyMessageParameters> messageHeaders) { super( leaderRetriever, timeout, responseHeaders, messageHeaders); }
Example #10
Source File: BatchFineGrainedRecoveryITCase.java From flink with Apache License 2.0 | 5 votes |
private Collection<JobID> getJobs() { JobIdsWithStatusOverview jobIds = sendRequest( JobIdsWithStatusesOverviewHeaders.getInstance(), EmptyMessageParameters.getInstance()) .join(); return jobIds .getJobsWithStatus() .stream() .map(JobIdWithStatus::getJobId) .collect(Collectors.toList()); }
Example #11
Source File: JobIdsHandler.java From flink with Apache License 2.0 | 5 votes |
public JobIdsHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, JobIdsWithStatusOverview, EmptyMessageParameters> messageHeaders) { super( leaderRetriever, timeout, responseHeaders, messageHeaders); }
Example #12
Source File: JobIdsWithStatusesOverviewHeaders.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public Class<JobIdsWithStatusOverview> getResponseClass() { return JobIdsWithStatusOverview.class; }
Example #13
Source File: JobIdsWithStatusesOverviewHeaders.java From flink with Apache License 2.0 | 4 votes |
@Override public Class<JobIdsWithStatusOverview> getResponseClass() { return JobIdsWithStatusOverview.class; }
Example #14
Source File: JobIdsWithStatusesOverviewHeaders.java From flink with Apache License 2.0 | 4 votes |
@Override public Class<JobIdsWithStatusOverview> getResponseClass() { return JobIdsWithStatusOverview.class; }