use of org.apache.hadoop.ozone.recon.tasks.NSSummaryTask in project ozone by apache.
the class TestNSSummaryEndpoint method setUp.
@Before
public void setUp() throws Exception {
omMetadataManager = initializeNewOmMetadataManager(temporaryFolder.newFolder());
ozoneManagerServiceProvider = getMockOzoneManagerServiceProviderWithFSO();
reconOMMetadataManager = getTestReconOmMetadataManager(omMetadataManager, temporaryFolder.newFolder());
ReconTestInjector reconTestInjector = new ReconTestInjector.Builder(temporaryFolder).withReconOm(reconOMMetadataManager).withOmServiceProvider(ozoneManagerServiceProvider).withReconSqlDb().withContainerDB().addBinding(OzoneStorageContainerManager.class, getMockReconSCM()).addBinding(StorageContainerServiceProvider.class, mock(StorageContainerServiceProviderImpl.class)).addBinding(NSSummaryEndpoint.class).build();
reconNamespaceSummaryManager = reconTestInjector.getInstance(ReconNamespaceSummaryManager.class);
nsSummaryEndpoint = reconTestInjector.getInstance(NSSummaryEndpoint.class);
// populate OM DB and reprocess into Recon RocksDB
populateOMDB();
NSSummaryTask nsSummaryTask = new NSSummaryTask(reconNamespaceSummaryManager);
nsSummaryTask.reprocess(reconOMMetadataManager);
}
Aggregations