use of org.apache.hadoop.ozone.recon.ReconUtils in project ozone by apache.
the class AbstractReconContainerManagerTest method setUp.
@Before
public void setUp() throws Exception {
conf = new OzoneConfiguration();
conf.set(OZONE_METADATA_DIRS, temporaryFolder.newFolder().getAbsolutePath());
conf.set(OZONE_SCM_NAMES, "localhost");
store = DBStoreBuilder.createDBStore(conf, new ReconSCMDBDefinition());
scmhaManager = MockSCMHAManager.getInstance(true, new MockSCMHADBTransactionBuffer(store));
sequenceIdGen = new SequenceIdGenerator(conf, scmhaManager, ReconSCMDBDefinition.SEQUENCE_ID.getTable(store));
scmContext = SCMContext.emptyContext();
scmStorageConfig = new ReconStorageConfig(conf, new ReconUtils());
NetworkTopology clusterMap = new NetworkTopologyImpl(conf);
EventQueue eventQueue = new EventQueue();
layoutVersionManager = mock(HDDSLayoutVersionManager.class);
when(layoutVersionManager.getSoftwareLayoutVersion()).thenReturn(maxLayoutVersion());
when(layoutVersionManager.getMetadataLayoutVersion()).thenReturn(maxLayoutVersion());
NodeManager nodeManager = new SCMNodeManager(conf, scmStorageConfig, eventQueue, clusterMap, scmContext, layoutVersionManager);
pipelineManager = ReconPipelineManager.newReconPipelineManager(conf, nodeManager, ReconSCMDBDefinition.PIPELINES.getTable(store), eventQueue, scmhaManager, scmContext);
containerManager = new ReconContainerManager(conf, store, ReconSCMDBDefinition.CONTAINERS.getTable(store), pipelineManager, getScmServiceProvider(), mock(ContainerHealthSchemaManager.class), mock(ReconContainerMetadataManager.class), scmhaManager, sequenceIdGen);
}
Aggregations