Example usage for org.apache.mahout.utils.clustering ClusterDumper setConf

List of usage examples for org.apache.mahout.utils.clustering ClusterDumper setConf

Introduction

In this page you can find the example usage for org.apache.mahout.utils.clustering ClusterDumper setConf.

Prototype

@Override
public void setConf(Configuration conf) 

Source Link

Document

Overrides the base implementation to install the Oozie action configuration resource into the provided Configuration object; note that ToolRunner calls setConf on the Tool before it invokes run.

Usage

From source file:com.modofo.molo.cluster.Clusterer.java

License:Apache License

public void dump(String topicId, String clusterId) {
    String clusterDir = this.tempDir + "/" + topicId + "/cluster/clusters-" + clusterId;
    String dumpDir = this.tempDir + "/" + topicId + "/cluster/clusters-" + clusterId + "-dump";
    String dicDir = this.tempDir + "/" + topicId + "/" + topicId + "-vectors/dictionary.file-0";
    String[] args = { "-i", clusterDir, "-o", dumpDir, "-d", dicDir, "-dt", "sequencefile", "-b", "100", "-n",
            "20" };
    ClusterDumper cd = new ClusterDumper();
    cd.setConf(new Configuration());
    try {//from w  w w  . j a  v a2 s . c  om
        cd.run(args);
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}