private void generatePartitionIds() throws Exception { for (int writer = 0; writer < partitionIds.length; writer++) { partitionIds[writer] = new ResultPartitionID(); } }
protected ResultPartitionWriter createResultPartition( JobID jobId, ResultPartitionID partitionId, NetworkEnvironment environment, int channels) throws Exception { ResultPartition resultPartition = new ResultPartition( "sender task", new NoOpTaskActions(), jobId, partitionId, ResultPartitionType.PIPELINED_BOUNDED, channels, 1, environment.getResultPartitionManager(), new NoOpResultPartitionConsumableNotifier(), ioManager, false); environment.setupPartition(resultPartition); return resultPartition; }
ResultPartitionConsumableNotifier consumableNotifier = new NoOpResultPartitionConsumableNotifier(); PartitionProducerStateChecker partitionProducerStateChecker = mock(PartitionProducerStateChecker.class); Executor executor = mock(Executor.class);
@Override public void notifySubpartitionConsumed() throws IOException { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { spilled.notifySubpartitionConsumed(); } else { parent.onConsumedSubpartition(); } }
@Override public Throwable getFailureCause() { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { return spilled.getFailureCause(); } else { return parent.getFailureCause(); } }
/** * Notifies pipelined consumers of this result partition once. */ private void notifyPipelinedConsumers() { if (sendScheduleOrUpdateConsumersMessage && !hasNotifiedPipelinedConsumers && partitionType.isPipelined()) { partitionConsumableNotifier.notifyPartitionConsumable(jobId, partitionId, taskActions); hasNotifiedPipelinedConsumers = true; } } }
bufferPool, nettyConnectionManager, new ResultPartitionManager(), new TaskEventDispatcher(), new KvStateRegistry(),
dsType.isBlocking()); } else { assertFalse("Expected non-batch exchange, but result type is " + dsType + ".", dsType.isBlocking());
@Override public void notifySubpartitionConsumed() throws IOException { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { spilled.notifySubpartitionConsumed(); } else { parent.onConsumedSubpartition(); } }
@Override public Throwable getFailureCause() { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { return spilled.getFailureCause(); } else { return parent.getFailureCause(); } }
/** * Notifies pipelined consumers of this result partition once. */ private void notifyPipelinedConsumers() { if (sendScheduleOrUpdateConsumersMessage && !hasNotifiedPipelinedConsumers && partitionType.isPipelined()) { partitionConsumableNotifier.notifyPartitionConsumable(jobId, partitionId, taskActions); hasNotifiedPipelinedConsumers = true; } } }
new TestingTaskManagerRuntimeInfo(), UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(), new NoOpResultPartitionConsumableNotifier(), mock(PartitionProducerStateChecker.class), Executors.directExecutor());
@Override public void notifySubpartitionConsumed() throws IOException { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { spilled.notifySubpartitionConsumed(); } else { parent.onConsumedSubpartition(); } }
@Override public Throwable getFailureCause() { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { return spilled.getFailureCause(); } else { return parent.getFailureCause(); } }
/** * Notifies pipelined consumers of this result partition once. */ private void notifyPipelinedConsumers() { if (sendScheduleOrUpdateConsumersMessage && !hasNotifiedPipelinedConsumers && partitionType.isPipelined()) { partitionConsumableNotifier.notifyPartitionConsumable(jobId, partitionId, taskActions); hasNotifiedPipelinedConsumers = true; } } }
new TestingTaskManagerRuntimeInfo(), UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(), new NoOpResultPartitionConsumableNotifier(), mock(PartitionProducerStateChecker.class), mock(Executor.class));
@Override public void notifySubpartitionConsumed() throws IOException { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { spilled.notifySubpartitionConsumed(); } else { parent.onConsumedSubpartition(); } }
@Override public Throwable getFailureCause() { SpilledSubpartitionView spilled = spilledView; if (spilled != null) { return spilled.getFailureCause(); } else { return parent.getFailureCause(); } }
/** * Notifies pipelined consumers of this result partition once. */ private void notifyPipelinedConsumers() { if (sendScheduleOrUpdateConsumersMessage && !hasNotifiedPipelinedConsumers && partitionType.isPipelined()) { partitionConsumableNotifier.notifyPartitionConsumable(jobId, partitionId, taskActions); hasNotifiedPipelinedConsumers = true; } }
taskManagerRuntimeInfo, UnregisteredMetricGroups.createUnregisteredTaskMetricGroup(), new NoOpResultPartitionConsumableNotifier(), mock(PartitionProducerStateChecker.class), Executors.directExecutor());