Sxnan commented on code in PR #19653:
URL: https://github.com/apache/flink/pull/19653#discussion_r890770323
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/JobMasterPartitionTrackerImpl.java:
##########
@@ -120,6 +129,31 @@ public Collection<ResultPartitionDeploymentDescriptor>
getAllTrackedPartitions()
return
partitionInfos.values().stream().map(PartitionInfo::getMetaInfo).collect(toList());
}
+ @Override
+ public void connectToResourceManager(ResourceManagerGateway
resourceManagerGateway) {
+ this.resourceManagerGateway = resourceManagerGateway;
+ }
+
+ @Override
+ public List<ShuffleDescriptor> getClusterPartitionShuffleDescriptors(
+ IntermediateDataSetID intermediateDataSetID) {
+ return clusterPartitionShuffleDescriptors.computeIfAbsent(
+ intermediateDataSetID,
this::requestShuffleDescriptorsFromResourceManager);
+ }
+
+ private List<ShuffleDescriptor>
requestShuffleDescriptorsFromResourceManager(
+ IntermediateDataSetID intermediateDataSetID) {
+ Preconditions.checkNotNull(
+ resourceManagerGateway, "JobMaster is not connected to
ResourceManager");
+ try {
+ return this.resourceManagerGateway
+
.getClusterPartitionsShuffleDescriptors(intermediateDataSetID)
+ .get();
+ } catch (InterruptedException | ExecutionException e) {
+ throw new RuntimeException(e);
Review Comment:
The message is added. And it catches all throwable.
[62bb33d](https://github.com/apache/flink/pull/19653/commits/62bb33d10fb8ac51450ca96e336c3c312259e12a)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]