Package com.intel.hadoop.graphbuilder.partition.mapreduce.edge

Examples of com.intel.hadoop.graphbuilder.partition.mapreduce.edge.EdgeIngressMR


   * @throws NotFoundException
   * @throws CannotCompileException
   */
  public boolean run(int nparts, String[] inputs, String output)
      throws NotFoundException, CannotCompileException {
    EdgeIngressMR job1 = new EdgeIngressMR(
        graphParserClass(),
        ParserFactory
        .getParserByClassName(vidClass().getName()).getClass(),
        ParserFactory
        .getParserByClassName(vdataClass().getName()).getClass(),
        ParserFactory
        .getParserByClassName(edataClass().getName()).getClass());
    job1.setKeyValueClass(IngressJobKeyValueFactory
        .getKeyClassByClassName(vidClass().getName()),
        IngressJobKeyValueFactory.getValueClassByClassName(
            vidClass().getName(), vdataClass().getName(), edataClass()
                .getName()));
    // Distribute new class file to cluster.
    FsUtil.distributedTempClassToClassPath(job1.getConf());
    VrecordIngressMR job2 = new VrecordIngressMR();

    try {
      job1.run(inputs, output + "/edges", nparts, "greedy");
      job2.run(nparts, output + "/edges/vrecord", output + "/vrecords");
    } catch (Exception e) {
      e.printStackTrace();
      return false;
    }
View Full Code Here


*
* @author Haijie Gu
*/
public class EdgeIngressTest {
  public static void main(String[] args) throws Exception {
    EdgeIngressMR mr = new EdgeIngressMR(BasicGraphParser.class,
        IntParser.class, EmptyParser.class, EmptyParser.class);
    mr.useGzip(true);
    // mr.setKeyValueClass(IntIngressKeyType.class,
    // Empty2IngressValueType.class);
    Class keyClass = IngressJobKeyValueFactory
        .getKeyClassByClassName(TypeFactory.getClassName("int"));
    Class valClass = IngressJobKeyValueFactory.getValueClassByClassName(
        TypeFactory.getClassName("int"), TypeFactory.getClassName("none"),
        TypeFactory.getClassName("none"));
    mr.setKeyValueClass(keyClass, valClass);
    mr.run(new String[] { args[0] }, args[1], Integer.valueOf(args[2]), args[3]);
  }
View Full Code Here

TOP

Related Classes of com.intel.hadoop.graphbuilder.partition.mapreduce.edge.EdgeIngressMR

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.