Package org.apache.giraph.job

Examples of org.apache.giraph.job.GiraphJob.run()


    conf.setVertexOutputFormatClass(JsonBase64VertexOutputFormat.class);
    job = prepareJob(getCallingMethodName(), conf, outputPath2);
    job.getConfiguration().setInt(WeightedPageRankVertex.SUPERSTEP_COUNT, 3);
    GiraphFileInputFormat.addVertexInputPath(
      job.getInternalJob().getConfiguration(), outputPath);
    assertTrue(job.run(true));

    Path outputPath3 = getTempPath(getCallingMethodName() + "3");
    conf = new GiraphConfiguration();
    conf.setVertexClass(WeightedPageRankVertex.class);
    conf.setVertexInputFormatClass(PseudoRandomVertexInputFormat.class);
View Full Code Here


    job = prepareJob(getCallingMethodName(), conf, outputPath3);
    conf = job.getConfiguration();
    conf.setLong(PseudoRandomInputFormatConstants.AGGREGATE_VERTICES, 101);
    conf.setLong(PseudoRandomInputFormatConstants.EDGES_PER_VERTEX, 2);
    conf.setInt(WeightedPageRankVertex.SUPERSTEP_COUNT, 5);
    assertTrue(job.run(true));

    assertEquals(101, getNumResults(conf, outputPath));
    assertEquals(101, getNumResults(conf, outputPath2));
    assertEquals(101, getNumResults(conf, outputPath3));
  }
View Full Code Here

        getTempPath("_singleFaultCheckpoints").toString());
    GiraphConstants.CLEANUP_CHECKPOINTS_AFTER_SUCCESS.set(conf, false);
    GiraphConstants.ZOOKEEPER_SESSION_TIMEOUT.set(conf, 10000);
    GiraphConstants.ZOOKEEPER_MIN_SESSION_TIMEOUT.set(conf, 10000);
    GiraphJob job = prepareJob(getCallingMethodName(), conf, outputPath);
    assertTrue(job.run(true));
  }
}
View Full Code Here

    }
    if (cmd.hasOption('s')) {
      getConf().setInt(SUPERSTEP_COUNT,
          Integer.parseInt(cmd.getOptionValue('s')));
    }
    if (bspJob.run(verbose)) {
      return 0;
    } else {
      return -1;
    }
  }
View Full Code Here

    job.getConfiguration().set(
        PartitionBalancer.PARTITION_BALANCE_ALGORITHM,
        PartitionBalancer.VERTICES_BALANCE_ALGORITHM);

    assertTrue(job.run(true));
    FileSystem hdfs = FileSystem.get(job.getConfiguration());

    conf = new GiraphConfiguration();
    conf.setVertexClass(
        SimpleCheckpointVertex.SimpleCheckpointComputation.class);
View Full Code Here

        SimpleCheckpointVertex.SimpleCheckpointVertexMasterCompute.class);
    conf.setVertexInputFormatClass(SimpleSuperstepVertexInputFormat.class);
    conf.setVertexOutputFormatClass(SimpleSuperstepVertexOutputFormat.class);
    outputPath = getTempPath("testHashPartitioner");
    job = prepareJob("testHashPartitioner", conf, outputPath);
    assertTrue(job.run(true));
    verifyOutput(hdfs, outputPath);

    outputPath = getTempPath("testSuperstepHashPartitioner");
    conf = new GiraphConfiguration();
    conf.setVertexClass(
View Full Code Here

    job = prepareJob("testSuperstepHashPartitioner", conf, outputPath);

    job.getConfiguration().setGraphPartitionerFactoryClass(
        SuperstepHashPartitionerFactory.class);

    assertTrue(job.run(true));
    verifyOutput(hdfs, outputPath);

    job = new GiraphJob("testHashRangePartitioner");
    setupConfiguration(job);
    job.getConfiguration().setVertexClass(
View Full Code Here

        SimpleSuperstepVertexOutputFormat.class);
    job.getConfiguration().setGraphPartitionerFactoryClass(
        HashRangePartitionerFactory.class);
    outputPath = getTempPath("testHashRangePartitioner");
    removeAndSetOutput(job, outputPath);
    assertTrue(job.run(true));
    verifyOutput(hdfs, outputPath);

    outputPath = getTempPath("testReverseIdSuperstepHashPartitioner");
    conf = new GiraphConfiguration();
    conf.setVertexClass(
View Full Code Here

        outputPath);
    job.getConfiguration().setGraphPartitionerFactoryClass(
        SuperstepHashPartitionerFactory.class);
    job.getConfiguration().setBoolean(
        GeneratedVertexReader.REVERSE_ID_ORDER, true);
    assertTrue(job.run(true));
    verifyOutput(hdfs, outputPath);

    job = new GiraphJob("testSimpleRangePartitioner");
    setupConfiguration(job);
    job.getConfiguration().setVertexClass(
View Full Code Here

    job.getConfiguration().setLong(
        GiraphConstants.PARTITION_VERTEX_KEY_SPACE_SIZE, readerVertices);

    outputPath = getTempPath("testSimpleRangePartitioner");
    removeAndSetOutput(job, outputPath);
    assertTrue(job.run(true));
    verifyOutput(hdfs, outputPath);
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.