org.apache.flink.runtime.rpc.RpcTimeout Java Examples
The following examples show how to use
org.apache.flink.runtime.rpc.RpcTimeout.
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: TaskExecutorGateway.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
CompletableFuture<StackTraceSampleResponse> requestStackTraceSample( ExecutionAttemptID executionAttemptId, int sampleId, int numSamples, Time delayBetweenSamples, int maxStackTraceDepth, @RpcTimeout Time timeout);
Example #2
Source File: TaskExecutorGateway.java From flink with Apache License 2.0 | 5 votes |
CompletableFuture<StackTraceSampleResponse> requestStackTraceSample( ExecutionAttemptID executionAttemptId, int sampleId, int numSamples, Time delayBetweenSamples, int maxStackTraceDepth, @RpcTimeout Time timeout);
Example #3
Source File: AkkaInvocationHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Checks whether any of the annotations is of type {@link RpcTimeout}. * * @param annotations Array of annotations * @return True if {@link RpcTimeout} was found; otherwise false */ private static boolean isRpcTimeout(Annotation[] annotations) { for (Annotation annotation : annotations) { if (annotation.annotationType().equals(RpcTimeout.class)) { return true; } } return false; }
Example #4
Source File: AkkaInvocationHandler.java From flink with Apache License 2.0 | 5 votes |
/** * Checks whether any of the annotations is of type {@link RpcTimeout}. * * @param annotations Array of annotations * @return True if {@link RpcTimeout} was found; otherwise false */ private static boolean isRpcTimeout(Annotation[] annotations) { for (Annotation annotation : annotations) { if (annotation.annotationType().equals(RpcTimeout.class)) { return true; } } return false; }
Example #5
Source File: TestingDispatcherGateway.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public CompletableFuture<ArchivedExecutionGraph> requestJob(JobID jobId, @RpcTimeout Time timeout) { return requestArchivedJobFunction.apply(jobId); }
Example #6
Source File: TestingDispatcherGateway.java From flink with Apache License 2.0 | 4 votes |
public CompletableFuture<ArchivedExecutionGraph> requestJob(JobID jobId, @RpcTimeout Time timeout) { return requestArchivedJobFunction.apply(jobId); }
Example #7
Source File: RestfulGateway.java From flink with Apache License 2.0 | 3 votes |
/** * Triggers a savepoint with the given savepoint directory as a target. * * @param jobId ID of the job for which the savepoint should be triggered. * @param targetDirectory Target directory for the savepoint. * @param timeout Timeout for the asynchronous operation * @return A future to the {@link CompletedCheckpoint#getExternalPointer() external pointer} of * the savepoint. */ default CompletableFuture<String> triggerSavepoint( JobID jobId, String targetDirectory, boolean cancelJob, @RpcTimeout Time timeout) { throw new UnsupportedOperationException(); }
Example #8
Source File: RestfulGateway.java From flink with Apache License 2.0 | 3 votes |
/** * Stops the job with a savepoint. * * @param jobId ID of the job for which the savepoint should be triggered. * @param targetDirectory to which to write the savepoint data or null if the * default savepoint directory should be used * @param advanceToEndOfEventTime Flag indicating if the source should inject a {@code MAX_WATERMARK} in the pipeline * to fire any registered event-time timers * @param timeout for the rpc call * @return Future which is completed with the savepoint path once completed */ default CompletableFuture<String> stopWithSavepoint( final JobID jobId, final String targetDirectory, final boolean advanceToEndOfEventTime, @RpcTimeout final Time timeout) { throw new UnsupportedOperationException(); }
Example #9
Source File: TaskExecutorGateway.java From Flink-CEPplus with Apache License 2.0 | 3 votes |
/** * Requests a slot from the TaskManager. * * @param slotId slot id for the request * @param jobId for which to request a slot * @param allocationId id for the request * @param targetAddress to which to offer the requested slots * @param resourceManagerId current leader id of the ResourceManager * @param timeout for the operation * @return answer to the slot request */ CompletableFuture<Acknowledge> requestSlot( SlotID slotId, JobID jobId, AllocationID allocationId, String targetAddress, ResourceManagerId resourceManagerId, @RpcTimeout Time timeout);
Example #10
Source File: RestfulGateway.java From Flink-CEPplus with Apache License 2.0 | 3 votes |
/** * Trigger rescaling of the given job. * * @param jobId specifying the job to rescale * @param newParallelism new parallelism of the job * @param rescalingBehaviour defining how strict the rescaling has to be executed * @param timeout of this operation * @return Future which is completed with {@link Acknowledge} once the rescaling was successful */ default CompletableFuture<Acknowledge> rescaleJob( JobID jobId, int newParallelism, RescalingBehaviour rescalingBehaviour, @RpcTimeout Time timeout) { throw new UnsupportedOperationException(); }
Example #11
Source File: RestfulGateway.java From Flink-CEPplus with Apache License 2.0 | 3 votes |
/** * Triggers a savepoint with the given savepoint directory as a target. * * @param jobId ID of the job for which the savepoint should be triggered. * @param targetDirectory Target directory for the savepoint. * @param timeout Timeout for the asynchronous operation * @return A future to the {@link CompletedCheckpoint#getExternalPointer() external pointer} of * the savepoint. */ default CompletableFuture<String> triggerSavepoint( JobID jobId, String targetDirectory, boolean cancelJob, @RpcTimeout Time timeout) { throw new UnsupportedOperationException(); }
Example #12
Source File: ResourceManagerGateway.java From flink with Apache License 2.0 | 3 votes |
/** * Register a {@link TaskExecutor} at the resource manager. * * @param taskExecutorAddress The address of the TaskExecutor that registers * @param resourceId The resource ID of the TaskExecutor that registers * @param dataPort port used for data communication between TaskExecutors * @param hardwareDescription of the registering TaskExecutor * @param timeout The timeout for the response. * * @return The future to the response by the ResourceManager. */ CompletableFuture<RegistrationResponse> registerTaskExecutor( String taskExecutorAddress, ResourceID resourceId, int dataPort, HardwareDescription hardwareDescription, @RpcTimeout Time timeout);
Example #13
Source File: ResourceManagerGateway.java From flink with Apache License 2.0 | 3 votes |
/** * Register a {@link JobMaster} at the resource manager. * * @param jobMasterId The fencing token for the JobMaster leader * @param jobMasterResourceId The resource ID of the JobMaster that registers * @param jobMasterAddress The address of the JobMaster that registers * @param jobId The Job ID of the JobMaster that registers * @param timeout Timeout for the future to complete * @return Future registration response */ CompletableFuture<RegistrationResponse> registerJobManager( JobMasterId jobMasterId, ResourceID jobMasterResourceId, String jobMasterAddress, JobID jobId, @RpcTimeout Time timeout);
Example #14
Source File: ResourceManagerGateway.java From Flink-CEPplus with Apache License 2.0 | 3 votes |
/** * Register a {@link TaskExecutor} at the resource manager. * * @param taskExecutorAddress The address of the TaskExecutor that registers * @param resourceId The resource ID of the TaskExecutor that registers * @param dataPort port used for data communication between TaskExecutors * @param hardwareDescription of the registering TaskExecutor * @param timeout The timeout for the response. * * @return The future to the response by the ResourceManager. */ CompletableFuture<RegistrationResponse> registerTaskExecutor( String taskExecutorAddress, ResourceID resourceId, int dataPort, HardwareDescription hardwareDescription, @RpcTimeout Time timeout);
Example #15
Source File: TaskExecutorGateway.java From flink with Apache License 2.0 | 3 votes |
/** * Requests a slot from the TaskManager. * * @param slotId slot id for the request * @param jobId for which to request a slot * @param allocationId id for the request * @param targetAddress to which to offer the requested slots * @param resourceManagerId current leader id of the ResourceManager * @param timeout for the operation * @return answer to the slot request */ CompletableFuture<Acknowledge> requestSlot( SlotID slotId, JobID jobId, AllocationID allocationId, String targetAddress, ResourceManagerId resourceManagerId, @RpcTimeout Time timeout);
Example #16
Source File: JobMasterGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Offers the given slots to the job manager. The response contains the set of accepted slots. * * @param taskManagerId identifying the task manager * @param slots to offer to the job manager * @param timeout for the rpc call * @return Future set of accepted slots. */ CompletableFuture<Collection<SlotOffer>> offerSlots( final ResourceID taskManagerId, final Collection<SlotOffer> slots, @RpcTimeout final Time timeout);
Example #17
Source File: RestfulGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Cancel the given job. * * @param jobId identifying the job to cancel * @param timeout of the operation * @return A future acknowledge if the cancellation succeeded */ CompletableFuture<Acknowledge> cancelJob(JobID jobId, @RpcTimeout Time timeout);
Example #18
Source File: JobMasterGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Requests the {@link ArchivedExecutionGraph} of the executed job. * * @param timeout for the rpc call * @return Future which is completed with the {@link ArchivedExecutionGraph} of the executed job */ CompletableFuture<ArchivedExecutionGraph> requestJob(@RpcTimeout Time timeout);
Example #19
Source File: JobMasterGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Registers the task manager at the job manager. * * @param taskManagerRpcAddress the rpc address of the task manager * @param taskManagerLocation location of the task manager * @param timeout for the rpc call * @return Future registration response indicating whether the registration was successful or not */ CompletableFuture<RegistrationResponse> registerTaskManager( final String taskManagerRpcAddress, final TaskManagerLocation taskManagerLocation, @RpcTimeout final Time timeout);
Example #20
Source File: JobMasterGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Triggers taking a savepoint of the executed job. * * @param targetDirectory to which to write the savepoint data or null if the * default savepoint directory should be used * @param timeout for the rpc call * @return Future which is completed with the savepoint path once completed */ CompletableFuture<String> triggerSavepoint( @Nullable final String targetDirectory, final boolean cancelJob, @RpcTimeout final Time timeout);
Example #21
Source File: DispatcherGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Submit a job to the dispatcher. * * @param jobGraph JobGraph to submit * @param timeout RPC timeout * @return A future acknowledge if the submission succeeded */ CompletableFuture<Acknowledge> submitJob( JobGraph jobGraph, @RpcTimeout Time timeout);
Example #22
Source File: DispatcherGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Requests the {@link ArchivedExecutionGraph} for the given jobId. If there is no such graph, then * the future is completed with a {@link FlinkJobNotFoundException}. * * <p>Note: We enforce that the returned future contains a {@link ArchivedExecutionGraph} unlike * the super interface. * * @param jobId identifying the job whose AccessExecutionGraph is requested * @param timeout for the asynchronous operation * @return Future containing the AccessExecutionGraph for the given jobId, otherwise {@link FlinkJobNotFoundException} */ @Override CompletableFuture<ArchivedExecutionGraph> requestJob(JobID jobId, @RpcTimeout Time timeout);
Example #23
Source File: DispatcherGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Returns the port of the blob server. * * @param timeout of the operation * @return A future integer of the blob server port */ CompletableFuture<Integer> getBlobServerPort(@RpcTimeout Time timeout);
Example #24
Source File: DispatcherGateway.java From flink with Apache License 2.0 | 2 votes |
/** * List the current set of submitted jobs. * * @param timeout RPC timeout * @return A future collection of currently submitted jobs */ CompletableFuture<Collection<JobID>> listJobs( @RpcTimeout Time timeout);
Example #25
Source File: RestfulGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Requests the addresses for the TaskManagers' {@link MetricQueryService} to query. * * @param timeout for the asynchronous operation * @return Future containing the collection of instance ids and the corresponding metric query service address */ CompletableFuture<Collection<Tuple2<ResourceID, String>>> requestTaskManagerMetricQueryServiceAddresses(@RpcTimeout Time timeout);
Example #26
Source File: TaskManagerGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Frees the slot with the given allocation ID. * * @param allocationId identifying the slot to free * @param cause of the freeing operation * @param timeout for the operation * @return Future acknowledge which is returned once the slot has been freed */ CompletableFuture<Acknowledge> freeSlot( final AllocationID allocationId, final Throwable cause, @RpcTimeout final Time timeout);
Example #27
Source File: TaskManagerGateway.java From Flink-CEPplus with Apache License 2.0 | 2 votes |
/** * Frees the slot with the given allocation ID. * * @param allocationId identifying the slot to free * @param cause of the freeing operation * @param timeout for the operation * @return Future acknowledge which is returned once the slot has been freed */ CompletableFuture<Acknowledge> freeSlot( final AllocationID allocationId, final Throwable cause, @RpcTimeout final Time timeout);
Example #28
Source File: ResourceManagerGateway.java From Flink-CEPplus with Apache License 2.0 | 2 votes |
/** * Requests the paths for the TaskManager's {@link MetricQueryService} to query. * * @param timeout for the asynchronous operation * @return Future containing the collection of resource ids and the corresponding metric query service path */ CompletableFuture<Collection<Tuple2<ResourceID, String>>> requestTaskManagerMetricQueryServicePaths(@RpcTimeout Time timeout);
Example #29
Source File: TaskExecutorGateway.java From flink with Apache License 2.0 | 2 votes |
/** * Frees the slot with the given allocation ID. * * @param allocationId identifying the slot to free * @param cause of the freeing operation * @param timeout for the operation * @return Future acknowledge which is returned once the slot has been freed */ CompletableFuture<Acknowledge> freeSlot( final AllocationID allocationId, final Throwable cause, @RpcTimeout final Time timeout);
Example #30
Source File: ResourceManagerGateway.java From Flink-CEPplus with Apache License 2.0 | 2 votes |
/** * Requests information about the given {@link TaskExecutor}. * * @param taskManagerId identifying the TaskExecutor for which to return information * @param timeout of the request * @return Future TaskManager information */ CompletableFuture<TaskManagerInfo> requestTaskManagerInfo(ResourceID taskManagerId, @RpcTimeout Time timeout);