Marshaller<ByteBuffer> identity = Marshallers.getByteBufferMarshaller();
// Uses LevelDbOutputWriter wrapping GoogleCloudStorageFileOutputWriter rather than
// GoogleCloudStorageLevelDbOutputWriter because the padding at the end of the slice is
// unneeded as the file is being finalized.
return new MarshallingOutputWriter<>(
new LevelDbOutputWriter(new GoogleCloudStorageFileOutputWriter(
new GcsFilename(bucket, fileName), MapReduceConstants.REDUCE_INPUT_MIME_TYPE)),
Marshallers.getKeyValuesMarshaller(identity, identity));
}