Toggle navigation
Home
org.apache.flink.runtime.concurrent.Future to java.util.concurrent.CompletableFuture
No. of Instances - 281
No. of Commits - 17
No. of Projects - {'flink'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Internal -> Jdk
Mapping:
Other
gateway.registrationCall(leaderId,timeoutMillis)
to
gateway.registrationCall(leaderId,timeoutMillis)
gateway.registerTaskManager(taskManagerRpcAddress,taskManagerLocation,leaderId,Time.milliseconds(timeoutMillis))
to
gateway.registerTaskManager(taskManagerRpcAddress,taskManagerLocation,leaderId,Time.milliseconds(timeoutMillis))
resourceManager.registerTaskExecutor(leaderId,taskExecutorAddress,resourceID,slotReport,timeout)
to
resourceManager.registerTaskExecutor(leaderId,taskExecutorAddress,resourceID,slotReport,timeout)
jobMasterGateway.requestPartitionState(jobMasterLeaderId,resultId,partitionId)
to
jobMasterGateway.requestPartitionState(jobMasterLeaderId,resultId,partitionId)
slotProvider.allocateSlot(toSchedule,queued)
to
slotProvider.allocateSlot(toSchedule,queued)
taskManagerGateway.requestStackTraceSample(attemptId,sampleId,numSamples,delayBetweenSamples,maxStrackTraceDepth,timeout)
to
taskManagerGateway.requestStackTraceSample(attemptId,sampleId,numSamples,delayBetweenSamples,maxStrackTraceDepth,timeout)
gateway.allocateSlot(task,ResourceProfile.UNKNOWN,locationPreferences,timeout)
to
gateway.allocateSlot(task,ResourceProfile.UNKNOWN,locationPreferences,timeout)
FutureUtils.completedExceptionally(exception)
to
FutureUtils.completedExceptionally(exception)
FutureUtils.completedExceptionally(exception)
to
FutureUtils.completedExceptionally(exception)
internalAllocateSlot(task,resources,locationPreferences)
to
internalAllocateSlot(task,resources,locationPreferences)
Cascading Type Change (Similar)
Future<Void>
to
CompletableFuture<Void>
Future<Void>
to
CompletableFuture<Void>
Future<Void>
to
CompletableFuture<Void>
Future<Void>
to
CompletableFuture<Void>
Future<SimpleSlot>
to
CompletableFuture<SimpleSlot>
Add or Remove Method invocation
resourceManagerFuture.thenAcceptAsync(new AcceptFunction<Gateway>(){ @Override public void accept( Gateway result){ log.info("Resolved {} address, beginning registration",targetName); register(result,1,initialRegistrationTimeout); } } ,rpcService.getExecutor())
to
resourceManagerFuture.thenAcceptAsync((Gateway result) -> { log.info("Resolved {} address, beginning registration",targetName); register(result,1,initialRegistrationTimeout); } ,rpcService.getExecutor())
registrationFuture.thenAcceptAsync(new AcceptFunction<RegistrationResponse>(){ @Override public void accept( RegistrationResponse result){ if (!isCanceled()) { if (result instanceof RegistrationResponse.Success) { Success success=(Success)result; completionFuture.complete(Tuple2.of(gateway,success)); } else { if (result instanceof RegistrationResponse.Decline) { RegistrationResponse.Decline decline=(RegistrationResponse.Decline)result; log.info("Registration at {} was declined: {}",targetName,decline.getReason()); } else { log.error("Received unknown response to registration attempt: {}",result); } log.info("Pausing and re-attempting registration in {} ms",delayOnRefusedRegistration); registerLater(gateway,1,initialRegistrationTimeout,delayOnRefusedRegistration); } } } } ,rpcService.getExecutor())
to
registrationFuture.thenAcceptAsync((RegistrationResponse result) -> { if (!isCanceled()) { if (result instanceof RegistrationResponse.Success) { Success success=(Success)result; completionFuture.complete(Tuple2.of(gateway,success)); } else { if (result instanceof RegistrationResponse.Decline) { RegistrationResponse.Decline decline=(RegistrationResponse.Decline)result; log.info("Registration at {} was declined: {}",targetName,decline.getReason()); } else { log.error("Received unknown response to registration attempt: {}",result); } log.info("Pausing and re-attempting registration in {} ms",delayOnRefusedRegistration); registerLater(gateway,1,initialRegistrationTimeout,delayOnRefusedRegistration); } } } ,rpcService.getExecutor())
FlinkCompletableFuture.completed(watermark)
to
CompletableFuture.completedFuture(watermark)
rmResponse.thenAcceptAsync(new AcceptFunction<Acknowledge>(){ @Override public void accept( Acknowledge value){ slotRequestToResourceManagerSuccess(allocationID); } } ,getMainThreadExecutor())
to
rmResponse.thenAcceptAsync((Acknowledge value) -> { slotRequestToResourceManagerSuccess(allocationID); } ,getMainThreadExecutor())
slotAllocationFuture.handle(new BiFunction<SimpleSlot,Throwable,Void>(){ @Override public Void apply( SimpleSlot simpleSlot, Throwable throwable){ if (simpleSlot != null) { try { deployToSlot(simpleSlot); } catch ( Throwable t) { try { simpleSlot.releaseSlot(); } finally { markFailed(t); } } } else { markFailed(throwable); } return null; } } )
to
slotAllocationFuture.handle((simpleSlot,throwable) -> { if (simpleSlot != null) { try { deployToSlot(simpleSlot); } catch ( Throwable t) { try { simpleSlot.releaseSlot(); } finally { markFailed(t); } } } else { markFailed(throwable); } return null; } )
FlinkCompletableFuture.completed(response)
to
CompletableFuture.completedFuture(response)
this.<RegistrationResponse>futureWithTimeout(timeout)
to
futureWithTimeout(timeout)
Update Class Instacne Creation
new Exception("No gateway registered under that name")
to
new Exception("No gateway registered under " + address + '.')
new Exception("No gateway registered under that name")
to
new Exception("No gateway registered under " + address + '.')
Cascading Type Change (Different)
FlinkCompletableFuture<>
to
CompletableFuture<>