Skip to content

Commit 4c9ecac

Browse files
KarmaGYZxintongsong
authored andcommitted
[hotfix][coordination] Add log for slot allocation in FineGrainedSlotManager
This closes #15748
1 parent 33d98e1 commit 4c9ecac

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/DefaultSlotStatusSyncer.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.apache.flink.api.common.JobID;
2222
import org.apache.flink.api.common.time.Time;
2323
import org.apache.flink.runtime.clusterframework.types.AllocationID;
24+
import org.apache.flink.runtime.clusterframework.types.ResourceID;
2425
import org.apache.flink.runtime.clusterframework.types.ResourceProfile;
2526
import org.apache.flink.runtime.clusterframework.types.SlotID;
2627
import org.apache.flink.runtime.concurrent.FutureUtils;
@@ -106,6 +107,14 @@ public CompletableFuture<Void> allocateSlot(
106107
"Could not find a registered task manager for instance id " + instanceId + '.');
107108
final TaskExecutorGateway gateway =
108109
taskManager.get().getTaskExecutorConnection().getTaskExecutorGateway();
110+
final ResourceID resourceId = taskManager.get().getTaskExecutorConnection().getResourceID();
111+
112+
LOG.debug(
113+
"Starting allocation of slot {} from {} for job {} with resource profile {}.",
114+
allocationId,
115+
resourceId,
116+
jobId,
117+
resourceProfile);
109118

110119
taskManagerTracker.notifySlotStatus(
111120
allocationId, jobId, instanceId, resourceProfile, SlotState.PENDING);
@@ -115,8 +124,7 @@ public CompletableFuture<Void> allocateSlot(
115124
// RPC call to the task manager
116125
CompletableFuture<Acknowledge> requestFuture =
117126
gateway.requestSlot(
118-
SlotID.getDynamicSlotID(
119-
taskManager.get().getTaskExecutorConnection().getResourceID()),
127+
SlotID.getDynamicSlotID(resourceId),
120128
jobId,
121129
allocationId,
122130
resourceProfile,

0 commit comments

Comments
 (0)