Package org.apache.giraph.bsp

Examples of org.apache.giraph.bsp.SuperstepState


        incrCachedSuperstep();
        // Counter starts at zero, so no need to increment
        if (getSuperstep() > 0) {
            superstepCounter.increment(1);
        }
        SuperstepState superstepState;
        if ((globalStats.getFinishedVertexCount() ==
                globalStats.getVertexCount()) &&
                globalStats.getMessageCount() == 0) {
            superstepState = SuperstepState.ALL_SUPERSTEPS_DONE;
        } else {
View Full Code Here


                    long setupMillis = (System.currentTimeMillis() - startMillis);
                    context.getCounter(GIRAPH_TIMERS_COUNTER_GROUP_NAME,
                            "Setup (milliseconds)").
                            increment(setupMillis);
                    setupSecs = setupMillis / 1000.0d;
                    SuperstepState superstepState = SuperstepState.INITIAL;
                    long cachedSuperstep = BspService.UNSET_SUPERSTEP;
                    while (superstepState != SuperstepState.ALL_SUPERSTEPS_DONE) {
                        long startSuperstepMillis = System.currentTimeMillis();
                        cachedSuperstep = bspServiceMaster.getSuperstep();
                        superstepState = bspServiceMaster.coordinateSuperstep();
View Full Code Here

    incrCachedSuperstep();
    // Counter starts at zero, so no need to increment
    if (getSuperstep() > 0) {
      GiraphStats.getInstance().getSuperstepCounter().increment();
    }
    SuperstepState superstepState;
    if (globalStats.getHaltComputation()) {
      superstepState = SuperstepState.ALL_SUPERSTEPS_DONE;
    } else {
      superstepState = SuperstepState.THIS_SUPERSTEP_DONE;
    }
View Full Code Here

            (bspServiceMaster.createVertexInputSplits() != -1 &&
                bspServiceMaster.createEdgeInputSplits() != -1)) {
          long setupMillis = System.currentTimeMillis() - startMillis;
          GiraphTimers.getInstance().getSetupMs().increment(setupMillis);
          setupSecs = setupMillis / 1000.0d;
          SuperstepState superstepState = SuperstepState.INITIAL;
          long cachedSuperstep = BspService.UNSET_SUPERSTEP;
          while (superstepState != SuperstepState.ALL_SUPERSTEPS_DONE) {
            long startSuperstepMillis = System.currentTimeMillis();
            cachedSuperstep = bspServiceMaster.getSuperstep();
            GiraphMetrics.get().resetSuperstepMetrics(cachedSuperstep);
View Full Code Here

    incrCachedSuperstep();
    // Counter starts at zero, so no need to increment
    if (getSuperstep() > 0) {
      GiraphStats.getInstance().getSuperstepCounter().increment();
    }
    SuperstepState superstepState;
    if (globalStats.getHaltComputation()) {
      superstepState = SuperstepState.ALL_SUPERSTEPS_DONE;
    } else {
      superstepState = SuperstepState.THIS_SUPERSTEP_DONE;
    }
View Full Code Here

    try {
      long startMillis = System.currentTimeMillis();
      long initializeMillis = 0;
      long endMillis = 0;
      bspServiceMaster.setup();
      SuperstepState superstepState = SuperstepState.INITIAL;

      if (bspServiceMaster.becomeMaster()) {
        // First call to checkWorkers waits for all pending resources.
        // If these resources are still available at subsequent calls it just
        // reads zookeeper for the list of healthy workers.
        bspServiceMaster.checkWorkers();
        initializeMillis = System.currentTimeMillis();
        GiraphTimers.getInstance().getInitializeMs().increment(
            initializeMillis - startMillis);
        // Attempt to create InputSplits if necessary. Bail out if that fails.
        if (bspServiceMaster.getRestartedSuperstep() !=
            BspService.UNSET_SUPERSTEP ||
            (bspServiceMaster.createMappingInputSplits() != -1 &&
                bspServiceMaster.createVertexInputSplits() != -1 &&
                bspServiceMaster.createEdgeInputSplits() != -1)) {
          long setupMillis = System.currentTimeMillis() - initializeMillis;
          GiraphTimers.getInstance().getSetupMs().increment(setupMillis);
          setupSecs = setupMillis / 1000.0d;
          while (!superstepState.isExecutionComplete()) {
            long startSuperstepMillis = System.currentTimeMillis();
            long cachedSuperstep = bspServiceMaster.getSuperstep();
            GiraphMetrics.get().resetSuperstepMetrics(cachedSuperstep);
            Class<? extends Computation> computationClass =
                bspServiceMaster.getMasterCompute().getComputation();
View Full Code Here

TOP

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

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.