class FileSystemCommitter implements Serializable {

	public void commitUpToCheckpoint(long toCpId) throws Exception {
		FileSystem fs = factory.create(tmpPath.toUri());

		try (PartitionLoader loader = new PartitionLoader(overwrite, fs, metaStoreFactory)) {
			for (long cp : headCheckpoints(fs, tmpPath, toCpId)) {
				commitSingleCheckpoint(fs, loader, cp);
			}
		}
	}

	  FileSystemCommitter(
			FileSystemFactory factory,
			TableMetaStoreFactory metaStoreFactory,
			boolean overwrite,
			Path tmpPath,
			int partitionColumnSize);

}