@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TaskExecutionStatus taskExecutionStatus = (TaskExecutionStatus) o; return executionAttemptID.equals(taskExecutionStatus.getExecutionAttemptID()); } }
@Override public boolean equals(Object o) { if (this == o) { return true; } else if (o instanceof AbstractCheckpointMessage) { AbstractCheckpointMessage that = (AbstractCheckpointMessage) o; return this.job.equals(that.job) && this.taskExecutionId.equals(that.taskExecutionId) && this.checkpointId == that.checkpointId; } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof TaskExecutionState) { TaskExecutionState other = (TaskExecutionState) obj; return other.jobID.equals(this.jobID) && other.executionId.equals(this.executionId) && other.executionState == this.executionState && (other.throwable == null) == (this.throwable == null); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof TaskExecutionState) { TaskExecutionState other = (TaskExecutionState) obj; return other.jobID.equals(this.jobID) && other.executionId.equals(this.executionId) && other.executionState == this.executionState && (other.throwable == null) == (this.throwable == null); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof TaskExecutionState) { TaskExecutionState other = (TaskExecutionState) obj; return other.jobID.equals(this.jobID) && other.executionId.equals(this.executionId) && other.executionState == this.executionState && (other.throwable == null) == (this.throwable == null); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof TaskExecutionState) { TaskExecutionState other = (TaskExecutionState) obj; return other.jobID.equals(this.jobID) && other.executionId.equals(this.executionId) && other.executionState == this.executionState && (other.throwable == null) == (this.throwable == null); } else { return false; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } else if (o instanceof AbstractCheckpointMessage) { AbstractCheckpointMessage that = (AbstractCheckpointMessage) o; return this.job.equals(that.job) && this.taskExecutionId.equals(that.taskExecutionId) && this.checkpointId == that.checkpointId; } else { return false; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } else if (o instanceof AbstractCheckpointMessage) { AbstractCheckpointMessage that = (AbstractCheckpointMessage) o; return this.job.equals(that.job) && this.taskExecutionId.equals(that.taskExecutionId) && this.checkpointId == that.checkpointId; } else { return false; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } else if (o instanceof AbstractCheckpointMessage) { AbstractCheckpointMessage that = (AbstractCheckpointMessage) o; return this.job.equals(that.job) && this.taskExecutionId.equals(that.taskExecutionId) && this.checkpointId == that.checkpointId; } else { return false; } }
@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == ResultPartitionID.class) { ResultPartitionID o = (ResultPartitionID) obj; return o.getPartitionId().equals(partitionId) && o.getProducerId().equals(producerId); } return false; }
@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == ResultPartitionID.class) { ResultPartitionID o = (ResultPartitionID) obj; return o.getPartitionId().equals(partitionId) && o.getProducerId().equals(producerId); } return false; }
@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == ResultPartitionID.class) { ResultPartitionID o = (ResultPartitionID) obj; return o.getPartitionId().equals(partitionId) && o.getProducerId().equals(producerId); } return false; }
@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == ResultPartitionID.class) { ResultPartitionID o = (ResultPartitionID) obj; return o.getPartitionId().equals(partitionId) && o.getProducerId().equals(producerId); } return false; }
/** * Schedules or updates the consumer tasks of the result partition with the given ID. */ void scheduleOrUpdateConsumers(ResultPartitionID partitionId) { final Execution execution = currentExecution; // Abort this request if there was a concurrent reset if (!partitionId.getProducerId().equals(execution.getAttemptId())) { return; } final IntermediateResultPartition partition = resultPartitions.get(partitionId.getPartitionId()); if (partition == null) { throw new IllegalStateException("Unknown partition " + partitionId + "."); } if (partition.getIntermediateResult().getResultType().isPipelined()) { // Schedule or update receivers of this partition execution.scheduleOrUpdateConsumers(partition.getConsumers()); } else { throw new IllegalArgumentException("ScheduleOrUpdateConsumers msg is only valid for" + "pipelined partitions."); } }
/** * Schedules or updates the consumer tasks of the result partition with the given ID. */ void scheduleOrUpdateConsumers(ResultPartitionID partitionId) { final Execution execution = currentExecution; // Abort this request if there was a concurrent reset if (!partitionId.getProducerId().equals(execution.getAttemptId())) { return; } final IntermediateResultPartition partition = resultPartitions.get(partitionId.getPartitionId()); if (partition == null) { throw new IllegalStateException("Unknown partition " + partitionId + "."); } if (partition.getIntermediateResult().getResultType().isPipelined()) { // Schedule or update receivers of this partition execution.scheduleOrUpdateConsumers(partition.getConsumers()); } else { throw new IllegalArgumentException("ScheduleOrUpdateConsumers msg is only valid for" + "pipelined partitions."); } }
/** * Schedules or updates the consumer tasks of the result partition with the given ID. */ void scheduleOrUpdateConsumers(ResultPartitionID partitionId) { final Execution execution = currentExecution; // Abort this request if there was a concurrent reset if (!partitionId.getProducerId().equals(execution.getAttemptId())) { return; } final IntermediateResultPartition partition = resultPartitions.get(partitionId.getPartitionId()); if (partition == null) { throw new IllegalStateException("Unknown partition " + partitionId + "."); } if (partition.getIntermediateResult().getResultType().isPipelined()) { // Schedule or update receivers of this partition execution.scheduleOrUpdateConsumers(partition.getConsumers()); } else { throw new IllegalArgumentException("ScheduleOrUpdateConsumers msg is only valid for" + "pipelined partitions."); } }
/** * Schedules or updates the consumer tasks of the result partition with the given ID. */ void scheduleOrUpdateConsumers(ResultPartitionID partitionId) { final Execution execution = currentExecution; // Abort this request if there was a concurrent reset if (!partitionId.getProducerId().equals(execution.getAttemptId())) { return; } final IntermediateResultPartition partition = resultPartitions.get(partitionId.getPartitionId()); if (partition == null) { throw new IllegalStateException("Unknown partition " + partitionId + "."); } if (partition.getIntermediateResult().getResultType().isPipelined()) { // Schedule or update receivers of this partition partition.markDataProduced(); // Notify the scheduler to handle the consumable partition notifyAndUpdateConsumers(partition); } else { throw new IllegalArgumentException("ScheduleOrUpdateConsumers msg is only valid for" + "pipelined partitions."); } }
@Override public CompletableFuture<ExecutionState> requestPartitionState( final IntermediateDataSetID intermediateResultId, final ResultPartitionID resultPartitionId) { final Execution execution = executionGraph.getRegisteredExecutions().get(resultPartitionId.getProducerId()); if (execution != null) { return CompletableFuture.completedFuture(execution.getState()); } else { final IntermediateResult intermediateResult = executionGraph.getAllIntermediateResults().get(intermediateResultId); if (intermediateResult != null) { // Try to find the producing execution Execution producerExecution = intermediateResult .getPartitionById(resultPartitionId.getPartitionId()) .getProducer() .getCurrentExecutionAttempt(); if (producerExecution.getAttemptId().equals(resultPartitionId.getProducerId())) { return CompletableFuture.completedFuture(producerExecution.getState()); } else { return FutureUtils.completedExceptionally(new PartitionProducerDisposedException(resultPartitionId)); } } else { return FutureUtils.completedExceptionally(new IllegalArgumentException("Intermediate data set with ID " + intermediateResultId + " not found.")); } } }
@Override public CompletableFuture<ExecutionState> requestPartitionState( final IntermediateDataSetID intermediateResultId, final ResultPartitionID resultPartitionId) { final Execution execution = executionGraph.getRegisteredExecutions().get(resultPartitionId.getProducerId()); if (execution != null) { return CompletableFuture.completedFuture(execution.getState()); } else { final IntermediateResult intermediateResult = executionGraph.getAllIntermediateResults().get(intermediateResultId); if (intermediateResult != null) { // Try to find the producing execution Execution producerExecution = intermediateResult .getPartitionById(resultPartitionId.getPartitionId()) .getProducer() .getCurrentExecutionAttempt(); if (producerExecution.getAttemptId().equals(resultPartitionId.getProducerId())) { return CompletableFuture.completedFuture(producerExecution.getState()); } else { return FutureUtils.completedExceptionally(new PartitionProducerDisposedException(resultPartitionId)); } } else { return FutureUtils.completedExceptionally(new IllegalArgumentException("Intermediate data set with ID " + intermediateResultId + " not found.")); } } }
@Override public CompletableFuture<ExecutionState> requestPartitionState( final IntermediateDataSetID intermediateResultId, final ResultPartitionID resultPartitionId) { final Execution execution = executionGraph.getRegisteredExecutions().get(resultPartitionId.getProducerId()); if (execution != null) { return CompletableFuture.completedFuture(execution.getState()); } else { final IntermediateResult intermediateResult = executionGraph.getAllIntermediateResults().get(intermediateResultId); if (intermediateResult != null) { // Try to find the producing execution Execution producerExecution = intermediateResult .getPartitionById(resultPartitionId.getPartitionId()) .getProducer() .getCurrentExecutionAttempt(); if (producerExecution.getAttemptId().equals(resultPartitionId.getProducerId())) { return CompletableFuture.completedFuture(producerExecution.getState()); } else { return FutureUtils.completedExceptionally(new PartitionProducerDisposedException(resultPartitionId)); } } else { return FutureUtils.completedExceptionally(new IllegalArgumentException("Intermediate data set with ID " + intermediateResultId + " not found.")); } } }