Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SortMergePartitionReader: Subpartition data reader for link SortMergeResultPartition. (Override methods are mainly inherited from ResultSubpartitionView and BufferRecycler)


public

...

   @Nullable
class SortMergeSubpartitionReader
implements ResultSubpartitionView, Comparable<SortMergeSubpartitionReader> {

@Nullable
@Override
public BufferAndBacklog getNextBuffer();

/** This method is called by the IO thread of {@link SortMergeResultPartitionReadScheduler}. */
public boolean readBuffers(Queue<MemorySegment> buffers, BufferRecycler recycler) throws IOException;

public CompletableFuture<?> getReleaseFuture();

public void fail(Throwable throwable);

@Override
public void notifyDataAvailable();

@Override
public int compareTo(SortMergeSubpartitionReader that);

@Override
public BufferAndBacklogvoid getNextBufferreleaseAllResources() throws IOException;

@Override
public voidboolean notifyDataAvailableisReleased();

@Override
public void recycleresumeConsumption(MemorySegment segment);

@Override
public voidThrowable releaseAllResourcesgetFailureCause();

@Override
public boolean isAvailable(int numCreditsAvailable);

@Override
public int unsynchronizedGetNumberOfQueuedBuffers();
}

The interface of SortBuffer is flexible enough and new requirements like sorting by record can be also implemented easily if needed.

...