/** * Post processes the output of clustering algorithms and groups them into respective clusters. Each * cluster's vectors are written into a directory named after its clusterId. * * @param input The output path provided to the clustering algorithm, whose would be post processed. Hint: The * path of the directory containing clusters-*-final and clusteredPoints. * @param output The post processed data would be stored at this path. * @param runSequential If set to true, post processes it sequentially, else, uses. MapReduce. Hint: If the clustering * was done sequentially, make it sequential, else vice versa. */ public static void run(Path input, Path output, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { if (runSequential) { postProcessSeq(input, output); } else { Configuration conf = new Configuration(); postProcessMR(conf, input, output); movePartFilesToRespectiveDirectories(conf, output); } }
/** * CLI to run clustering post processor. The input to post processor is the ouput path specified to the * clustering. */ @Override public int run(String[] args) throws Exception { addInputOption(); addOutputOption(); addOption(DefaultOptionCreator.methodOption().create()); addOption(DefaultOptionCreator.overwriteOption().create()); if (parseArguments(args) == null) { return -1; } Path input = getInputPath(); Path output = getOutputPath(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION)) { HadoopUtil.delete(getConf(), output); } boolean runSequential = getOption(DefaultOptionCreator.METHOD_OPTION).equalsIgnoreCase( DefaultOptionCreator.SEQUENTIAL_METHOD); run(input, output, runSequential); return 0; }
public static void main(String[] args) throws Exception { ToolRunner.run(new Configuration(), new ClusterOutputPostProcessorDriver(), args); }
/** * CLI to run clustering post processor. The input to post processor is the ouput path specified to the * clustering. */ @Override public int run(String[] args) throws Exception { addInputOption(); addOutputOption(); addOption(DefaultOptionCreator.methodOption().create()); addOption(DefaultOptionCreator.overwriteOption().create()); if (parseArguments(args) == null) { return -1; } Path input = getInputPath(); Path output = getOutputPath(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION)) { HadoopUtil.delete(getConf(), output); } boolean runSequential = getOption(DefaultOptionCreator.METHOD_OPTION).equalsIgnoreCase( DefaultOptionCreator.SEQUENTIAL_METHOD); run(input, output, runSequential); return 0; }
public static void main(String[] args) throws Exception { ToolRunner.run(new Configuration(), new ClusterOutputPostProcessorDriver(), args); }
/** * CLI to run clustering post processor. The input to post processor is the ouput path specified to the * clustering. */ @Override public int run(String[] args) throws Exception { addInputOption(); addOutputOption(); addOption(DefaultOptionCreator.methodOption().create()); addOption(DefaultOptionCreator.overwriteOption().create()); if (parseArguments(args) == null) { return -1; } Path input = getInputPath(); Path output = getOutputPath(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION)) { HadoopUtil.delete(getConf(), output); } boolean runSequential = getOption(DefaultOptionCreator.METHOD_OPTION).equalsIgnoreCase( DefaultOptionCreator.SEQUENTIAL_METHOD); run(input, output, runSequential); return 0; }
/** * Post processes the output of clustering algorithms and groups them into respective clusters. Each * cluster's vectors are written into a directory named after its clusterId. * * @param input The output path provided to the clustering algorithm, whose would be post processed. Hint: The * path of the directory containing clusters-*-final and clusteredPoints. * @param output The post processed data would be stored at this path. * @param runSequential If set to true, post processes it sequentially, else, uses. MapReduce. Hint: If the clustering * was done sequentially, make it sequential, else vice versa. */ public static void run(Path input, Path output, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { if (runSequential) { postProcessSeq(input, output); } else { Configuration conf = new Configuration(); postProcessMR(conf, input, output); movePartFilesToRespectiveDirectories(conf, output); } }
public static void main(String[] args) throws Exception { ToolRunner.run(new Configuration(), new ClusterOutputPostProcessorDriver(), args); }
/** * Post processes the output of clustering algorithms and groups them into respective clusters. Each * cluster's vectors are written into a directory named after its clusterId. * * @param input The output path provided to the clustering algorithm, whose would be post processed. Hint: The * path of the directory containing clusters-*-final and clusteredPoints. * @param output The post processed data would be stored at this path. * @param runSequential If set to true, post processes it sequentially, else, uses. MapReduce. Hint: If the clustering * was done sequentially, make it sequential, else vice versa. */ public static void run(Path input, Path output, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { if (runSequential) { postProcessSeq(input, output); } else { Configuration conf = new Configuration(); postProcessMR(conf, input, output); movePartFilesToRespectiveDirectories(conf, output); } }