Example usage for org.apache.mahout.clustering.canopy CanopyDriver CanopyDriver

List of usage examples for org.apache.mahout.clustering.canopy CanopyDriver CanopyDriver

Introduction

In this page you can find the example usage for org.apache.mahout.clustering.canopy CanopyDriver CanopyDriver.

Prototype

CanopyDriver

Source Link

Usage

From source file:root.benchmark.canopy.CanopyJob.java

License:Apache License

/**
 * {@inheritDoc}/* w  w w .j av a 2 s  .  c  om*/
 */
@Override
public int run(String[] args) throws Exception {

    constructParameterList();

    if (parseArguments(args) == null) {
        return -1;
    }

    initializeConfigurationParameters();

    printJobHeader();

    Configuration conf = getConf();

    URI inputURI = new URI(inputDirectory);

    FileSystem fs = FileSystem.get(inputURI, conf);

    Path input = new Path(inputDirectory);
    if (!fs.exists(input)) {
        System.err.println("Input Directory does not exist.");
        System.exit(2);
    }

    ToolRunner.run(conf, new CanopyDriver(), canopyArgs);

    return 0;
}