Search in sources :

Example 1 with NSSummaryTask

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);
}
Also used : StorageContainerServiceProviderImpl(org.apache.hadoop.ozone.recon.spi.impl.StorageContainerServiceProviderImpl) NSSummaryTask(org.apache.hadoop.ozone.recon.tasks.NSSummaryTask) ReconNamespaceSummaryManager(org.apache.hadoop.ozone.recon.spi.ReconNamespaceSummaryManager) ReconTestInjector(org.apache.hadoop.ozone.recon.ReconTestInjector) OzoneStorageContainerManager(org.apache.hadoop.hdds.scm.server.OzoneStorageContainerManager) Before(org.junit.Before)

Aggregations

OzoneStorageContainerManager (org.apache.hadoop.hdds.scm.server.OzoneStorageContainerManager)1 ReconTestInjector (org.apache.hadoop.ozone.recon.ReconTestInjector)1 ReconNamespaceSummaryManager (org.apache.hadoop.ozone.recon.spi.ReconNamespaceSummaryManager)1 StorageContainerServiceProviderImpl (org.apache.hadoop.ozone.recon.spi.impl.StorageContainerServiceProviderImpl)1 NSSummaryTask (org.apache.hadoop.ozone.recon.tasks.NSSummaryTask)1 Before (org.junit.Before)1