Package org.apache.giraph.partition

Examples of org.apache.giraph.partition.BasicPartitionOwner


        getCurrentPartitionOwners()) {
        WorkerInfo prevWorkerinfo =
          partitionOwner.getWorkerInfo().equals(chosenWorkerInfo) ?
            null : partitionOwner.getWorkerInfo();
        PartitionOwner tmpPartitionOwner =
          new BasicPartitionOwner(partitionOwner.getPartitionId(),
                                  chosenWorkerInfo,
                                  prevWorkerinfo,
                                  null);
        partitionOwnerList.add(tmpPartitionOwner);
        LOG.info("partition owner was " + partitionOwner +
View Full Code Here


    Answer<PartitionOwner> answer = new Answer<PartitionOwner>() {
      @Override
      public PartitionOwner answer(InvocationOnMock invocation) throws
          Throwable {
        IntWritable vertexId = (IntWritable) invocation.getArguments()[0];
        return new BasicPartitionOwner(vertexId.get() % numOfPartitions, null);
      }
    };
    Mockito.when(service.getVertexPartitionOwner(
        Mockito.any(IntWritable.class))).thenAnswer(answer);
    return service;
View Full Code Here

          "." + mrTaskId + CheckpointingUtils.CHECKPOINT_METADATA_POSTFIX));
      long partitions = metadataStream.readInt();
      WorkerInfo worker = workersMap.get(mrTaskId);
      for (long p = 0; p < partitions; ++p) {
        int partitionId = metadataStream.readInt();
        PartitionOwner partitionOwner = new BasicPartitionOwner(partitionId,
            worker);
        partitionOwners.add(partitionOwner);
        LOG.info("prepareCheckpointRestart partitionId=" + partitionId +
            " assigned to " + partitionOwner);
      }
View Full Code Here

    Answer<PartitionOwner> answer = new Answer<PartitionOwner>() {
      @Override
      public PartitionOwner answer(InvocationOnMock invocation) throws
          Throwable {
        IntWritable vertexId = (IntWritable) invocation.getArguments()[0];
        return new BasicPartitionOwner(vertexId.get() % numOfPartitions, null);
      }
    };
    Mockito.when(service.getVertexPartitionOwner(
        Mockito.any(IntWritable.class))).thenAnswer(answer);
    return service;
View Full Code Here

        getCurrentPartitionOwners()) {
        WorkerInfo prevWorkerinfo =
          partitionOwner.getWorkerInfo().equals(chosenWorkerInfo) ?
            null : partitionOwner.getWorkerInfo();
        PartitionOwner tmpPartitionOwner =
          new BasicPartitionOwner(partitionOwner.getPartitionId(),
                                  chosenWorkerInfo,
                                  prevWorkerinfo,
                                  null);
        partitionOwnerList.add(tmpPartitionOwner);
        LOG.info("partition owner was " + partitionOwner +
View Full Code Here

TOP

Related Classes of org.apache.giraph.partition.BasicPartitionOwner

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.