Search in sources :

Example 6 with MockRMContext

use of org.apache.myriad.state.MockRMContext in project incubator-myriad by apache.

the class NodeTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    context = new MockRMContext();
    context.setDispatcher(TestObjectFactory.getMockDispatcher());
    context.setSystemMetricsPublisher(new SystemMetricsPublisher());
    nodeOne = TestObjectFactory.getRMNode("localhost-one", 8800, Resource.newInstance(1024, 2));
    nodeTwo = TestObjectFactory.getRMNode("localhost-two", 8800, Resource.newInstance(2048, 4));
    sNodeOne = new FSSchedulerNode(nodeOne, false);
    sNodeTwo = new FSSchedulerNode(nodeTwo, false);
    store = new NodeStore();
    store.add(sNodeOne);
    store.add(sNodeTwo);
    containerOne = TestObjectFactory.getRMContainer(nodeOne, context, 1, 2, 1024);
}
Also used : MockRMContext(org.apache.myriad.state.MockRMContext) FSSchedulerNode(org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSSchedulerNode) SystemMetricsPublisher(org.apache.hadoop.yarn.server.resourcemanager.metrics.SystemMetricsPublisher) Before(org.junit.Before)

Aggregations

MockRMContext (org.apache.myriad.state.MockRMContext)6 Before (org.junit.Before)4 SystemMetricsPublisher (org.apache.hadoop.yarn.server.resourcemanager.metrics.SystemMetricsPublisher)3 FSSchedulerNode (org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSSchedulerNode)3 MockSchedulerDriver (org.apache.myriad.scheduler.MockSchedulerDriver)3 MyriadDriver (org.apache.myriad.scheduler.MyriadDriver)3 NodeBase (org.apache.hadoop.net.NodeBase)2 NodeId (org.apache.hadoop.yarn.api.records.NodeId)2 RMNode (org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode)2 RMNodeImpl (org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl)2 MyriadConfiguration (org.apache.myriad.configuration.MyriadConfiguration)2 TaskUtils (org.apache.myriad.scheduler.TaskUtils)2 MyriadFairScheduler (org.apache.myriad.scheduler.yarn.MyriadFairScheduler)2 CompositeInterceptor (org.apache.myriad.scheduler.yarn.interceptor.CompositeInterceptor)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Configuration (org.apache.hadoop.conf.Configuration)1 NodeIdPBImpl (org.apache.hadoop.yarn.api.records.impl.pb.NodeIdPBImpl)1 ResourcePBImpl (org.apache.hadoop.yarn.api.records.impl.pb.ResourcePBImpl)1 Dispatcher (org.apache.hadoop.yarn.event.Dispatcher)1 NodeIdProto (org.apache.hadoop.yarn.proto.YarnProtos.NodeIdProto)1