@Test public void testIsReleasedChecksParent() { PipelinedSubpartition subpartition = mock(PipelinedSubpartition.class); PipelinedSubpartitionView reader = new PipelinedSubpartitionView( subpartition, mock(BufferAvailabilityListener.class)); assertFalse(reader.isReleased()); verify(subpartition, times(1)).isReleased(); when(subpartition.isReleased()).thenReturn(true); assertTrue(reader.isReleased()); verify(subpartition, times(2)).isReleased(); }
@Override public boolean isReleased() { return isReleased; }
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } }
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } PipelinedSubpartition(int index, ResultPartition parent); }
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } PipelinedSubpartition(int index, ResultPartition parent); @Override boolean add(BufferConsumer bufferConsumer); @Override void finish(); @Override void release(); @Override int releaseMemory(); @Override boolean isReleased(); @Override PipelinedSubpartitionView createReadView(BufferAvailabilityListener availabilityListener); boolean isAvailable(); @Override String toString(); @Override int unsynchronizedGetNumberOfQueuedBuffers(); @Override void flush(); @SuppressWarnings("FieldAccessNotGuarded") @VisibleForTesting int getBuffersInBacklog(); }
PipelinedSubpartition extends ResultSubpartition { @Override public boolean isReleased() { return isReleased; } PipelinedSubpartition(int index, ResultPartition parent); @Override boolean add(BufferConsumer bufferConsumer); @Override void finish(); @Override void release(); @Override int releaseMemory(); @Override boolean isReleased(); @Override PipelinedSubpartitionView createReadView(BufferAvailabilityListener availabilityListener); boolean isAvailable(); @Override String toString(); @Override int unsynchronizedGetNumberOfQueuedBuffers(); @Override void flush(); @SuppressWarnings("FieldAccessNotGuarded") @VisibleForTesting int getBuffersInBacklog();  }