/** * Save a cluster description to a hadoop filesystem * @param fs filesystem * @param path path * @param overwrite should any existing file be overwritten * @throws IOException IO exception */ public void save(FileSystem fs, Path path, T instance, boolean overwrite) throws IOException { FSDataOutputStream dataOutputStream = fs.create(path, overwrite); writeJsonAsBytes(instance, dataOutputStream); }