Package org.apache.giraph.bsp

Examples of org.apache.giraph.bsp.BspInputSplit


        throws IOException, InterruptedException {
         // This is meaningless, the VertexReader will generate all the test
         // data.
        List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
        for (int i = 0; i < numWorkers; ++i) {
            inputSplitList.add(new BspInputSplit(i, numWorkers));
        }
        return inputSplitList;
    }
View Full Code Here


            throws IOException, InterruptedException {
        // This is meaningless, the PseudoRandomVertexReader will generate
        // all the test data
        List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
        for (int i = 0; i < numWorkers; ++i) {
            inputSplitList.add(new BspInputSplit(i, numWorkers));
        }
        return inputSplitList;
    }
View Full Code Here

    throws IOException, InterruptedException {
    // This is meaningless, the VertexReader will generate all the test
    // data.
    List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
    for (int i = 0; i < minSplitCountHint; ++i) {
      inputSplitList.add(new BspInputSplit(i, minSplitCountHint));
    }
    return inputSplitList;
  }
View Full Code Here

    @Override
    public void initialize(InputSplit inputSplit,
        TaskAttemptContext context) throws IOException {
      int aggregateVertices = getConf().getInt(
          PseudoRandomInputFormatConstants.AGGREGATE_VERTICES, 0);
      BspInputSplit bspInputSplit = (BspInputSplit) inputSplit;
      int extraVertices = aggregateVertices % bspInputSplit.getNumSplits();
      totalSplitVertices = aggregateVertices / bspInputSplit.getNumSplits();
      if (bspInputSplit.getSplitIndex() < extraVertices) {
        ++totalSplitVertices;
      }
      startingVertexId = bspInputSplit.getSplitIndex() *
          (aggregateVertices / bspInputSplit.getNumSplits()) +
          Math.min(bspInputSplit.getSplitIndex(), extraVertices);
      edgesPerVertex = getConf().getInt(
          PseudoRandomInputFormatConstants.EDGES_PER_VERTEX, 0);
      rand = new Random(bspInputSplit.getSplitIndex());
      if (getConf().reuseEdgeObjects()) {
        reusableEdge = getConf().createReusableEdge();
      }
      localEdgesHelper = new PseudoRandomIntNullLocalEdgesHelper(
          aggregateVertices, getConf());
View Full Code Here

   */
  public static List<InputSplit> getSplits(int numSplits) throws IOException,
      InterruptedException {
    List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
    for (int i = 0; i < numSplits; ++i) {
      inputSplitList.add(new BspInputSplit(i, numSplits));
    }
    return inputSplitList;
  }
View Full Code Here

    throws IOException, InterruptedException {
    // This is meaningless, the VertexReader will generate all the test
    // data.
    List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
    for (int i = 0; i < minSplitCountHint; ++i) {
      inputSplitList.add(new BspInputSplit(i, minSplitCountHint));
    }
    return inputSplitList;
  }
View Full Code Here

    @Override
    public List<InputSplit> getSplits(JobContext context, int minSplitCountHint)
      throws IOException, InterruptedException {
      List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
      for (int i = 0; i < minSplitCountHint; ++i) {
        inputSplitList.add(new BspInputSplit(i, minSplitCountHint));
      }
      return inputSplitList;
    }
View Full Code Here

    throws IOException, InterruptedException {
    // This is meaningless, the VertexReader will generate all the test
    // data.
    List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
    for (int i = 0; i < minSplitCountHint; ++i) {
      inputSplitList.add(new BspInputSplit(i, minSplitCountHint));
    }
    return inputSplitList;
  }
View Full Code Here

    throws IOException, InterruptedException {
    // This is meaningless, the VertexReader will generate all the test
    // data.
    List<InputSplit> inputSplitList = new ArrayList<InputSplit>();
    for (int i = 0; i < minSplitCountHint; ++i) {
      inputSplitList.add(new BspInputSplit(i, minSplitCountHint));
    }
    return inputSplitList;
  }
View Full Code Here

    @Override
    public void initialize(InputSplit inputSplit,
        TaskAttemptContext context) throws IOException {
      int aggregateVertices = getConf().getInt(
          PseudoRandomInputFormatConstants.AGGREGATE_VERTICES, 0);
      BspInputSplit bspInputSplit = (BspInputSplit) inputSplit;
      int extraVertices = aggregateVertices % bspInputSplit.getNumSplits();
      totalSplitVertices = aggregateVertices / bspInputSplit.getNumSplits();
      if (bspInputSplit.getSplitIndex() < extraVertices) {
        ++totalSplitVertices;
      }
      startingVertexId = bspInputSplit.getSplitIndex() *
          (aggregateVertices / bspInputSplit.getNumSplits()) +
          Math.min(bspInputSplit.getSplitIndex(), extraVertices);
      edgesPerVertex = getConf().getInt(
          PseudoRandomInputFormatConstants.EDGES_PER_VERTEX, 0);
      rand = new Random(bspInputSplit.getSplitIndex());
      if (getConf().reuseEdgeObjects()) {
        reusableEdge = getConf().createReusableEdge();
      }
      localEdgesHelper = new PseudoRandomIntNullLocalEdgesHelper(
          aggregateVertices, getConf());
View Full Code Here

TOP

Related Classes of org.apache.giraph.bsp.BspInputSplit

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.