Search in sources :

Example 6 with ReconTestInjector

use of org.apache.hadoop.ozone.recon.ReconTestInjector in project ozone by apache.

the class TestReconNamespaceSummaryManagerImpl method setupOnce.

@BeforeClass
public static void setupOnce() throws Exception {
    ReconTestInjector reconTestInjector = new ReconTestInjector.Builder(TEMP_FOLDER).withReconSqlDb().withContainerDB().build();
    reconNamespaceSummaryManager = reconTestInjector.getInstance(ReconNamespaceSummaryManagerImpl.class);
    testBucket = new int[40];
    for (int i = 0; i < 40; ++i) {
        testBucket[i] = i + 1;
    }
}
Also used : ReconTestInjector(org.apache.hadoop.ozone.recon.ReconTestInjector) BeforeClass(org.junit.BeforeClass)

Example 7 with ReconTestInjector

use of org.apache.hadoop.ozone.recon.ReconTestInjector in project ozone by apache.

the class TestContainerKeyMapperTask method setUp.

@Before
public void setUp() throws Exception {
    omMetadataManager = initializeNewOmMetadataManager(temporaryFolder.newFolder());
    ozoneManagerServiceProvider = getMockOzoneManagerServiceProvider();
    reconOMMetadataManager = getTestReconOmMetadataManager(omMetadataManager, temporaryFolder.newFolder());
    ReconTestInjector reconTestInjector = new ReconTestInjector.Builder(temporaryFolder).withReconSqlDb().withReconOm(reconOMMetadataManager).withOmServiceProvider(ozoneManagerServiceProvider).withContainerDB().build();
    reconContainerMetadataManager = reconTestInjector.getInstance(ReconContainerMetadataManager.class);
}
Also used : ReconContainerMetadataManager(org.apache.hadoop.ozone.recon.spi.ReconContainerMetadataManager) ReconTestInjector(org.apache.hadoop.ozone.recon.ReconTestInjector) Before(org.junit.Before)

Example 8 with ReconTestInjector

use of org.apache.hadoop.ozone.recon.ReconTestInjector in project ozone by apache.

the class TestNSSummaryTask 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().build();
    reconNamespaceSummaryManager = reconTestInjector.getInstance(ReconNamespaceSummaryManager.class);
}
Also used : ReconNamespaceSummaryManager(org.apache.hadoop.ozone.recon.spi.ReconNamespaceSummaryManager) ReconTestInjector(org.apache.hadoop.ozone.recon.ReconTestInjector) Before(org.junit.Before)

Aggregations

ReconTestInjector (org.apache.hadoop.ozone.recon.ReconTestInjector)8 OzoneStorageContainerManager (org.apache.hadoop.hdds.scm.server.OzoneStorageContainerManager)4 ReconStorageContainerManagerFacade (org.apache.hadoop.ozone.recon.scm.ReconStorageContainerManagerFacade)3 ReconContainerMetadataManager (org.apache.hadoop.ozone.recon.spi.ReconContainerMetadataManager)3 Before (org.junit.Before)3 HttpURLConnection (java.net.HttpURLConnection)2 OzoneConfiguration (org.apache.hadoop.hdds.conf.OzoneConfiguration)2 ContainerInfo (org.apache.hadoop.hdds.scm.container.ContainerInfo)2 ContainerWithPipeline (org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline)2 StorageContainerLocationProtocol (org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocol)2 URLConnectionFactory (org.apache.hadoop.hdfs.web.URLConnectionFactory)2 ReconUtils (org.apache.hadoop.ozone.recon.ReconUtils)2 ContainerHealthSchemaManager (org.apache.hadoop.ozone.recon.persistence.ContainerHealthSchemaManager)2 ReconNamespaceSummaryManager (org.apache.hadoop.ozone.recon.spi.ReconNamespaceSummaryManager)2 StorageContainerServiceProvider (org.apache.hadoop.ozone.recon.spi.StorageContainerServiceProvider)2 StorageContainerServiceProviderImpl (org.apache.hadoop.ozone.recon.spi.impl.StorageContainerServiceProviderImpl)2 BeforeClass (org.junit.BeforeClass)2 InputStream (java.io.InputStream)1 LinkedList (java.util.LinkedList)1 Builder (org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.ContainerReportsProto.Builder)1