Search in sources :

Example 1 with ReconPipelineProvider

use of org.apache.hadoop.ozone.recon.scm.ReconPipelineFactory.ReconPipelineProvider in project ozone by apache.

the class TestReconPipelineManager method testStubbedReconPipelineFactory.

@Test
public void testStubbedReconPipelineFactory() throws IOException {
    NodeManager nodeManagerMock = mock(NodeManager.class);
    ReconPipelineManager reconPipelineManager = ReconPipelineManager.newReconPipelineManager(conf, nodeManagerMock, ReconSCMDBDefinition.PIPELINES.getTable(store), new EventQueue(), scmhaManager, scmContext);
    PipelineFactory pipelineFactory = reconPipelineManager.getPipelineFactory();
    assertTrue(pipelineFactory instanceof ReconPipelineFactory);
    ReconPipelineFactory reconPipelineFactory = (ReconPipelineFactory) pipelineFactory;
    assertTrue(reconPipelineFactory.getProviders().isEmpty());
    for (ReplicationType type : reconPipelineFactory.getProviders().keySet()) {
        PipelineProvider pipelineProvider = reconPipelineFactory.getProviders().get(type);
        assertTrue(pipelineProvider instanceof ReconPipelineProvider);
    }
}
Also used : NodeManager(org.apache.hadoop.hdds.scm.node.NodeManager) SCMNodeManager(org.apache.hadoop.hdds.scm.node.SCMNodeManager) ReplicationType(org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType) PipelineFactory(org.apache.hadoop.hdds.scm.pipeline.PipelineFactory) ReconPipelineProvider(org.apache.hadoop.ozone.recon.scm.ReconPipelineFactory.ReconPipelineProvider) ReconPipelineProvider(org.apache.hadoop.ozone.recon.scm.ReconPipelineFactory.ReconPipelineProvider) PipelineProvider(org.apache.hadoop.hdds.scm.pipeline.PipelineProvider) EventQueue(org.apache.hadoop.hdds.server.events.EventQueue) Test(org.junit.Test)

Aggregations

ReplicationType (org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationType)1 NodeManager (org.apache.hadoop.hdds.scm.node.NodeManager)1 SCMNodeManager (org.apache.hadoop.hdds.scm.node.SCMNodeManager)1 PipelineFactory (org.apache.hadoop.hdds.scm.pipeline.PipelineFactory)1 PipelineProvider (org.apache.hadoop.hdds.scm.pipeline.PipelineProvider)1 EventQueue (org.apache.hadoop.hdds.server.events.EventQueue)1 ReconPipelineProvider (org.apache.hadoop.ozone.recon.scm.ReconPipelineFactory.ReconPipelineProvider)1 Test (org.junit.Test)1