private MergingReader<ByteBuffer, ByteBuffer> createReaderForShard(
Marshaller<KeyValue<ByteBuffer, ? extends Iterable<ByteBuffer>>> marshaller,
GoogleCloudStorageFileSet inputFileSet) {
ArrayList<PeekingInputReader<KeyValue<ByteBuffer, ? extends Iterable<ByteBuffer>>>> inputFiles =
new ArrayList<>();
GoogleCloudStorageLevelDbInput reducerInput =
new GoogleCloudStorageLevelDbInput(inputFileSet, DEFAULT_IO_BUFFER_SIZE);
for (InputReader<ByteBuffer> in : reducerInput.createReaders()) {
inputFiles.add(new PeekingInputReader<>(in, marshaller));
}
return new MergingReader<>(inputFiles, Marshallers.getByteBufferMarshaller(), false);
}