org.apache.giraph.utils
Class MockUtils.MockedEnvironment<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by org.apache.giraph.utils.MockUtils.MockedEnvironment<I,V,E,M>
Type Parameters:
I - vertex id
V - vertex data
E - edge data
M - message data
Enclosing class:
MockUtils

public static class MockUtils.MockedEnvironment<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable>
extends Object

mocks and holds "environment objects" that are injected into a vertex


Constructor Summary
MockUtils.MockedEnvironment()
           
 
Method Summary
 org.apache.hadoop.conf.Configuration getConfiguration()
          the injected hadoop configuration
 org.apache.hadoop.mapreduce.Mapper.Context getContext()
          the injected mapper context
 GraphState getGraphState()
          the injected graph state
 WorkerClientRequestProcessor getWorkerClientRequestProcessor()
          the injected worker communications
 void verifyMessageSent(I targetVertexId, M message)
          assert that the test vertex message has been sent to a particular vertex
 void verifyNoMessageSent()
          assert that the test vertex has sent no message to a particular vertex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockUtils.MockedEnvironment

public MockUtils.MockedEnvironment()
Method Detail

getGraphState

public GraphState getGraphState()
the injected graph state


getContext

public org.apache.hadoop.mapreduce.Mapper.Context getContext()
the injected mapper context


getConfiguration

public org.apache.hadoop.conf.Configuration getConfiguration()
the injected hadoop configuration


getWorkerClientRequestProcessor

public WorkerClientRequestProcessor getWorkerClientRequestProcessor()
the injected worker communications


verifyMessageSent

public void verifyMessageSent(I targetVertexId,
                              M message)
assert that the test vertex message has been sent to a particular vertex


verifyNoMessageSent

public void verifyNoMessageSent()
assert that the test vertex has sent no message to a particular vertex



Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.