@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SlotID slotID = (SlotID) o; return slotNumber == slotID.slotNumber && resourceId.equals(slotID.resourceId); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SlotID slotID = (SlotID) o; return slotNumber == slotID.slotNumber && resourceId.equals(slotID.resourceId); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SlotID slotID = (SlotID) o; return slotNumber == slotID.slotNumber && resourceId.equals(slotID.resourceId); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SlotID slotID = (SlotID) o; return slotNumber == slotID.slotNumber && resourceId.equals(slotID.resourceId); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == TaskManagerLocation.class) { TaskManagerLocation that = (TaskManagerLocation) obj; return this.resourceID.equals(that.resourceID) && this.inetAddress.equals(that.inetAddress) && this.dataPort == that.dataPort; } else { return false; } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == TaskManagerLocation.class) { TaskManagerLocation that = (TaskManagerLocation) obj; return this.resourceID.equals(that.resourceID) && this.inetAddress.equals(that.inetAddress) && this.dataPort == that.dataPort; } else { return false; } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == TaskManagerLocation.class) { TaskManagerLocation that = (TaskManagerLocation) obj; return this.resourceID.equals(that.resourceID) && this.inetAddress.equals(that.inetAddress) && this.dataPort == that.dataPort; } else { return false; } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj != null && obj.getClass() == TaskManagerLocation.class) { TaskManagerLocation that = (TaskManagerLocation) obj; return this.resourceID.equals(that.resourceID) && this.inetAddress.equals(that.inetAddress) && this.dataPort == that.dataPort; } else { return false; } }
@Override public void notifyHeartbeatTimeout(final ResourceID resourceId) { runAsync(() -> { // first check whether the timeout is still valid if (establishedResourceManagerConnection != null && establishedResourceManagerConnection.getResourceManagerResourceId().equals(resourceId)) { log.info("The heartbeat of ResourceManager with id {} timed out.", resourceId); reconnectToResourceManager(new TaskManagerException( String.format("The heartbeat of ResourceManager with id %s timed out.", resourceId))); } else { log.debug("Received heartbeat timeout for outdated ResourceManager id {}. Ignoring the timeout.", resourceId); } }); }
@Override public void notifyHeartbeatTimeout(final ResourceID resourceId) { runAsync(() -> { log.info("The heartbeat of ResourceManager with id {} timed out.", resourceId); if (establishedResourceManagerConnection != null && establishedResourceManagerConnection.getResourceManagerResourceID().equals(resourceId)) { reconnectToResourceManager( new JobMasterException( String.format("The heartbeat of ResourceManager with id %s timed out.", resourceId))); } }); }
@Override public void notifyHeartbeatTimeout(final ResourceID resourceId) { runAsync(() -> { // first check whether the timeout is still valid if (establishedResourceManagerConnection != null && establishedResourceManagerConnection.getResourceManagerResourceId().equals(resourceId)) { log.info("The heartbeat of ResourceManager with id {} timed out.", resourceId); reconnectToResourceManager(new TaskManagerException( String.format("The heartbeat of ResourceManager with id %s timed out.", resourceId))); } else { log.debug("Received heartbeat timeout for outdated ResourceManager id {}. Ignoring the timeout.", resourceId); } }); }
@Override public void notifyHeartbeatTimeout(final ResourceID resourceId) { runAsync(() -> { log.info("The heartbeat of ResourceManager with id {} timed out.", resourceId); if (establishedResourceManagerConnection != null && establishedResourceManagerConnection.getResourceManagerResourceID().equals(resourceId)) { reconnectToResourceManager( new JobMasterException( String.format("The heartbeat of ResourceManager with id %s timed out.", resourceId))); } }); }
@Override public void notifyHeartbeatTimeout(final ResourceID resourceId) { runAsync(() -> { // first check whether the timeout is still valid if (establishedResourceManagerConnection != null && establishedResourceManagerConnection.getResourceManagerResourceId().equals(resourceId)) { log.info("The heartbeat of ResourceManager with id {} timed out.", resourceId); reconnectToResourceManager(new TaskManagerException( String.format("The heartbeat of ResourceManager with id %s timed out.", resourceId))); } else { log.debug("Received heartbeat timeout for outdated ResourceManager id {}. Ignoring the timeout.", resourceId); } }); }
@Override public void notifyHeartbeatTimeout(final ResourceID resourceId) { runAsync(() -> { log.info("The heartbeat of ResourceManager with id {} timed out.", resourceId); if (establishedResourceManagerConnection != null && establishedResourceManagerConnection.getResourceManagerResourceID().equals(resourceId)) { reconnectToResourceManager( new JobMasterException( String.format("The heartbeat of ResourceManager with id %s timed out.", resourceId))); } }); }
@VisibleForTesting List<List<SlotTag>> getTagsForTaskExecutor(ResourceID resourceId) { SlotID slotId = null; for (SlotID sid : slots.keySet()) { if (sid.getResourceID().equals(resourceId)) { slotId = sid; break; } } if (slotId == null) { return Collections.emptyList(); } return getTaskExecutorSlotTags(slotId); }
public ResourceProfile getTotalResourceOf(ResourceID resourceID) { ResourceProfile totalResources = new ResourceProfile(ResourceProfile.EMTPY); for (Map.Entry<SlotID, TaskManagerSlot> entry : slots.entrySet()) { if (entry.getKey().getResourceID().equals(resourceID) && !entry.getValue().getResourceProfile().equals(ResourceProfile.UNKNOWN)) { totalResources.addTo(entry.getValue().getResourceProfile()); } } return totalResources; }
public ResourceProfile getAvailableResourceOf(ResourceID resourceID) { ResourceProfile availableResources = new ResourceProfile(ResourceProfile.EMTPY); for (Map.Entry<SlotID, TaskManagerSlot> entry : slots.entrySet()) { if (entry.getValue().getState() == TaskManagerSlot.State.FREE && entry.getKey().getResourceID().equals(resourceID) && !entry.getValue().getResourceProfile().equals(ResourceProfile.UNKNOWN)) { availableResources.addTo(entry.getValue().getResourceProfile()); } } return availableResources; }
@Override public ResultPartitionLocation getResultPartitionLocation( TaskManagerLocation producerLocation, TaskManagerLocation consumerLocation, IntermediateResult intermediateResult) { if (consumerLocation.getResourceID().equals(producerLocation.getResourceID())) { // in the same taskmanager return ResultPartitionLocation.createLocal(); } else { // use the taskmanager ip and data port ConnectionID connectionId = new ConnectionID(producerLocation, intermediateResult.getConnectionIndex()); return ResultPartitionLocation.createRemote(connectionId); } } }
final ResourceID partitionTaskManager = partitionTaskManagerLocation.getResourceID(); if (partitionTaskManager.equals(consumerResourceId)) {
final ResourceID partitionTaskManager = partitionTaskManagerLocation.getResourceID(); if (partitionTaskManager.equals(consumerTaskManager)) {