Examples of GiraphTimerContext


Examples of org.apache.giraph.metrics.GiraphTimerContext

        LOG.fatal("runMasterCompute: Failed in access", e);
        throw new RuntimeException(
            "runMasterCompute: Failed in access", e);
      }
    }
    GiraphTimerContext timerContext = masterComputeTimer.time();
    masterCompute.compute();
    timerContext.stop();
  }
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

   *
   * @param graphState GraphState
   */
  private void postSuperstepCallbacks(GraphState<I, V, E, M> graphState) {
    getWorkerContext().setGraphState(graphState);
    GiraphTimerContext timerContext = wcPostSuperstepTimer.time();
    getWorkerContext().postSuperstep();
    timerContext.stop();
    getContext().progress();

    for (WorkerObserver obs : getWorkerObservers()) {
      obs.postSuperstep(graphState.getSuperstep());
      getContext().progress();
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

    if (LOG.isInfoEnabled()) {
      LOG.info("finishSuperstep: Waiting on all requests, superstep " +
          getSuperstep() + " " +
          MemoryUtils.getRuntimeMemoryStats());
    }
    GiraphTimerContext timerContext = waitRequestsTimer.time();
    workerClient.waitAllRequests();
    timerContext.stop();
  }
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

    int numComputeThreads = conf.getNumComputeThreads();

    // main superstep processing loop
    do {
      final long superstep = serviceWorker.getSuperstep();
      GiraphTimerContext superstepTimerContext =
        getTimerForThisSuperstep(superstep);
      GraphState<I, V, E, M> graphState =
        new GraphState<I, V, E, M>(superstep,
            finishedSuperstepStats.getVertexCount(),
            finishedSuperstepStats.getEdgeCount(),
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

  /**
   * Handle post-application callbacks.
   */
  private void postApplication() throws IOException, InterruptedException {
    GiraphTimerContext postAppTimerContext = wcPostAppTimer.time();
    serviceWorker.getWorkerContext().postApplication();
    serviceWorker.getSuperstepOutput().postApplication();
    postAppTimerContext.stop();
    context.progress();

    for (WorkerObserver obs : serviceWorker.getWorkerObservers()) {
      obs.postApplication();
      context.progress();
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

   */
  private void prepareForSuperstep(GraphState<I, V, E, M> graphState) {
    serviceWorker.prepareSuperstep();

    serviceWorker.getWorkerContext().setGraphState(graphState);
    GiraphTimerContext preSuperstepTimer = wcPreSuperstepTimer.time();
    serviceWorker.getWorkerContext().preSuperstep();
    preSuperstepTimer.stop();
    context.progress();

    for (WorkerObserver obs : serviceWorker.getWorkerObservers()) {
      obs.preSuperstep(graphState.getSuperstep());
      context.progress();
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

   * Notification from Vertex that a message has been sent.
   */
  public void notifySentMessages() {
    // We are tracking the time between when the compute started and the first
    // message get sent. We use null to flag that we have already recorded it.
    GiraphTimerContext tmp = timeToFirstMessageTimerContext;
    if (tmp != null) {
      synchronized (timeToFirstMessage) {
        if (timeToFirstMessageTimerContext != null) {
          timeToFirstMessageTimerContext.stop();
          timeToFirstMessageTimerContext = null;
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

  /**
   * Notification of last message flushed. Comes when we finish the superstep
   * and are done waiting for all messages to send.
   */
  public void notifyFinishedCommunication() {
    GiraphTimerContext tmp = communicationTimerContext;
    if (tmp != null) {
      synchronized (communicationTimer) {
        if (communicationTimerContext != null) {
          communicationTimerContext.stop();
          communicationTimerContext = null;
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

    for (Integer partitionId :
      serviceWorker.getPartitionStore().getPartitionIds()) {
      computePartitionIdQueue.add(partitionId);
    }

    GiraphTimerContext computeAllTimerContext = computeAll.time();
    timeToFirstMessageTimerContext = timeToFirstMessage.time();

    CallableFactory<Collection<PartitionStats>> callableFactory =
        new CallableFactory<Collection<PartitionStats>>() {
          @Override
          public Callable<Collection<PartitionStats>> newCallable(
              int callableId) {
            return new ComputeCallable<I, V, E, M>(
                context,
                graphState,
                messageStore,
                computePartitionIdQueue,
                conf,
                serviceWorker);
          }
        };
    List<Collection<PartitionStats>> results =
        ProgressableUtils.getResultsWithNCallables(callableFactory,
            numThreads, "compute-%d", context);
    for (Collection<PartitionStats> result : results) {
      partitionStatsList.addAll(result);
    }

    computeAllTimerContext.stop();
  }
View Full Code Here

Examples of org.apache.giraph.metrics.GiraphTimerContext

  /**
   * Call to the WorkerContext before application begins.
   */
  private void workerContextPreApp() {
    GiraphTimerContext preAppTimerContext = wcPreAppTimer.time();
    try {
      serviceWorker.getWorkerContext().preApplication();
    } catch (InstantiationException e) {
      LOG.fatal("execute: preApplication failed in instantiation", e);
      throw new RuntimeException(
          "execute: preApplication failed in instantiation", e);
    } catch (IllegalAccessException e) {
      LOG.fatal("execute: preApplication failed in access", e);
      throw new RuntimeException(
          "execute: preApplication failed in access", e);
    }
    preAppTimerContext.stop();
    context.progress();

    for (WorkerObserver obs : serviceWorker.getWorkerObservers()) {
      obs.preApplication();
      context.progress();
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.