class FileSystemOutputFormat implements OutputFormat<T>, FinalizeOnMaster, Serializable {

	@Override
	public void finalizeGlobal(int parallelism) {
		try {
			FileSystemCommitter committer = new FileSystemCommitter(
					fsFactory,
					msFactory,
					overwrite,
					tmpPath,
					partitionColumns.length);
			committer.commitUpToCheckpoint(CHECKPOINT_ID);
		} catch (Exception e) {
			throw new TableException("Exception in finalizeGlobal", e);
		} finally {
			new File(tmpPath.getPath()).delete();
		}
	}

	private  FileSystemOutputFormat(
			FileSystemFactory fsFactory,
			TableMetaStoreFactory msFactory,
			boolean overwrite,
			Path tmpPath,
			String[] partitionColumns,
			boolean dynamicGrouped,
			LinkedHashMap<String, String> staticPartitions,
			OutputFormatFactory<T> formatFactory,
			PartitionComputer<T> computer,
			OutputFileConfig outputFileConfig);

}