Package org.apache.giraph.partition

Examples of org.apache.giraph.partition.PartitionStore


            LongWritable vertexId = (LongWritable) invocation.getArguments()[0];
            return (int) (vertexId.get() % NUM_PARTITIONS);
          }
        }
    );
    PartitionStore partitionStore = Mockito.mock(PartitionStore.class);
    Mockito.when(service.getPartitionStore()).thenReturn(partitionStore);
    Mockito.when(partitionStore.getPartitionIds()).thenReturn(
        Lists.newArrayList(0, 1));
    Partition partition = Mockito.mock(Partition.class);
    Mockito.when(partition.getVertexCount()).thenReturn(Long.valueOf(1));
    Mockito.when(partitionStore.getOrCreatePartition(0)).thenReturn(partition);
    Mockito.when(partitionStore.getOrCreatePartition(1)).thenReturn(partition);
  }
View Full Code Here


            IntWritable vertexId = (IntWritable) invocation.getArguments()[0];
            return vertexId.get() % NUM_PARTITIONS;
          }
        }
    );
    PartitionStore partitionStore = Mockito.mock(PartitionStore.class);
    Mockito.when(service.getPartitionStore()).thenReturn(partitionStore);
    Mockito.when(partitionStore.getPartitionIds()).thenReturn(
        Lists.newArrayList(0, 1));
    Partition partition = Mockito.mock(Partition.class);
    Mockito.when(partition.getVertexCount()).thenReturn(Long.valueOf(1));
    Mockito.when(partitionStore.getOrCreatePartition(0)).thenReturn(partition);
    Mockito.when(partitionStore.getOrCreatePartition(1)).thenReturn(partition);
  }
View Full Code Here

      VertexIterator<I, V, E> vertexIterator =
          new VertexIterator<I, V, E>(
          iterator.getCurrentSecond(), getConf());

      Partition<I, V, E> partition;
      PartitionStore store = serverData.getPartitionStore();
      partition = store.getOrCreatePartition(iterator.getCurrentFirst());
      partition.addPartitionVertices(vertexIterator);
      store.putPartition(partition);
    }
  }
View Full Code Here

TOP

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

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.