public static Optional<Page> createPartitionManifest(PartitionUpdate partitionUpdate)
    {
        // Manifest Page layout:
        //   fileName    fileSize
        //      X           X
        //      X           X
        //      X           X
        // ....
        PageBuilder manifestBuilder = new PageBuilder(ImmutableList.of(VARCHAR, BIGINT));
        BlockBuilder fileNameBuilder = manifestBuilder.getBlockBuilder(0);
        BlockBuilder fileSizeBuilder = manifestBuilder.getBlockBuilder(1);
        for (FileWriteInfo fileWriteInfo : partitionUpdate.getFileWriteInfos()) {
            if (!fileWriteInfo.getFileSize().isPresent()) {
                return Optional.empty();
            }
            manifestBuilder.declarePosition();
            VARCHAR.writeSlice(fileNameBuilder, utf8Slice(fileWriteInfo.getWriteFileName()));
            BIGINT.writeLong(fileSizeBuilder, fileWriteInfo.getFileSize().get());
        }
        return Optional.of(manifestBuilder.build());
    }
@Test
    public void testCreatePartitionManifest()
    {
        PartitionUpdate partitionUpdate = new PartitionUpdate("testPartition", NEW, "/testDir", "/testDir", ImmutableList.of(new FileWriteInfo("testFileName", "testFileName", Optional.of(FILE_SIZE))), 100, 1024, 1024, false);
        Optional<Page> manifestPage = createPartitionManifest(partitionUpdate);
        assertTrue(manifestPage.isPresent());
        assertEquals(manifestPage.get().getChannelCount(), 2);
        assertEquals(manifestPage.get().getPositionCount(), 1);
    }