Search in sources :

Example 1 with ContainerHistory

use of org.apache.hadoop.ozone.recon.persistence.ContainerHistory in project ozone by apache.

the class TestContainerEndpoint method testGetReplicaHistoryForContainer.

@Test
public void testGetReplicaHistoryForContainer() throws IOException {
    // Add container history for container id 1
    final UUID u1 = newDatanode("host1", "127.0.0.1");
    final UUID u2 = newDatanode("host2", "127.0.0.2");
    final UUID u3 = newDatanode("host3", "127.0.0.3");
    final UUID u4 = newDatanode("host4", "127.0.0.4");
    reconContainerManager.upsertContainerHistory(1L, u1, 1L, 1L);
    reconContainerManager.upsertContainerHistory(1L, u2, 2L, 1L);
    reconContainerManager.upsertContainerHistory(1L, u3, 3L, 1L);
    reconContainerManager.upsertContainerHistory(1L, u4, 4L, 1L);
    reconContainerManager.upsertContainerHistory(1L, u1, 5L, 1L);
    Response response = containerEndpoint.getReplicaHistoryForContainer(1L);
    List<ContainerHistory> histories = (List<ContainerHistory>) response.getEntity();
    Set<String> datanodes = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(u1.toString(), u2.toString(), u3.toString(), u4.toString())));
    Assert.assertEquals(4, histories.size());
    histories.forEach(history -> {
        Assert.assertTrue(datanodes.contains(history.getDatanodeUuid()));
        if (history.getDatanodeUuid().equals(u1.toString())) {
            Assert.assertEquals("host1", history.getDatanodeHost());
            Assert.assertEquals(1L, history.getFirstSeenTime());
            Assert.assertEquals(5L, history.getLastSeenTime());
        }
    });
    // Check getLatestContainerHistory
    List<ContainerHistory> hist1 = reconContainerManager.getLatestContainerHistory(1L, 10);
    Assert.assertTrue(hist1.size() <= 10);
    // Descending order by last report timestamp
    for (int i = 0; i < hist1.size() - 1; i++) {
        Assert.assertTrue(hist1.get(i).getLastSeenTime() >= hist1.get(i + 1).getLastSeenTime());
    }
}
Also used : MissingContainersResponse(org.apache.hadoop.ozone.recon.api.types.MissingContainersResponse) KeysResponse(org.apache.hadoop.ozone.recon.api.types.KeysResponse) ContainersResponse(org.apache.hadoop.ozone.recon.api.types.ContainersResponse) Response(javax.ws.rs.core.Response) UnhealthyContainersResponse(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainersResponse) ContainerHistory(org.apache.hadoop.ozone.recon.persistence.ContainerHistory) List(java.util.List) ArrayList(java.util.ArrayList) UUID(java.util.UUID) Test(org.junit.Test)

Example 2 with ContainerHistory

use of org.apache.hadoop.ozone.recon.persistence.ContainerHistory in project ozone by apache.

the class ContainerEndpoint method getUnhealthyContainers.

/**
 * Return
 * {@link org.apache.hadoop.ozone.recon.api.types.UnhealthyContainerMetadata}
 * for all unhealthy containers.
 *
 * @param state Return only containers matching the given unhealthy state,
 *              eg UNDER_REPLICATED, MIS_REPLICATED, OVER_REPLICATED or
 *              MISSING. Passing null returns all containers.
 * @param limit The limit of unhealthy containers to return.
 * @param batchNum The batch number (like "page number") of results to return.
 *                 Passing 1, will return records 1 to limit. 2 will return
 *                 limit + 1 to 2 * limit, etc.
 * @return {@link Response}
 */
@GET
@Path("/unhealthy/{state}")
public Response getUnhealthyContainers(@PathParam("state") String state, @DefaultValue(DEFAULT_FETCH_COUNT) @QueryParam(RECON_QUERY_LIMIT) int limit, @DefaultValue(DEFAULT_BATCH_NUMBER) @QueryParam(RECON_QUERY_BATCH_PARAM) int batchNum) {
    int offset = Math.max(((batchNum - 1) * limit), 0);
    List<UnhealthyContainerMetadata> unhealthyMeta = new ArrayList<>();
    List<UnhealthyContainersSummary> summary;
    try {
        UnHealthyContainerStates internalState = null;
        if (state != null) {
            // If an invalid state is passed in, this will throw
            // illegalArgumentException and fail the request
            internalState = UnHealthyContainerStates.valueOf(state);
        }
        summary = containerHealthSchemaManager.getUnhealthyContainersSummary();
        List<UnhealthyContainers> containers = containerHealthSchemaManager.getUnhealthyContainers(internalState, offset, limit);
        for (UnhealthyContainers c : containers) {
            long containerID = c.getContainerId();
            ContainerInfo containerInfo = containerManager.getContainer(ContainerID.valueOf(containerID));
            long keyCount = containerInfo.getNumberOfKeys();
            UUID pipelineID = containerInfo.getPipelineID().getId();
            List<ContainerHistory> datanodes = containerManager.getLatestContainerHistory(containerID, containerInfo.getReplicationConfig().getRequiredNodes());
            unhealthyMeta.add(new UnhealthyContainerMetadata(c, datanodes, pipelineID, keyCount));
        }
    } catch (IOException ex) {
        throw new WebApplicationException(ex, Response.Status.INTERNAL_SERVER_ERROR);
    } catch (IllegalArgumentException e) {
        throw new WebApplicationException(e, Response.Status.BAD_REQUEST);
    }
    UnhealthyContainersResponse response = new UnhealthyContainersResponse(unhealthyMeta);
    for (UnhealthyContainersSummary s : summary) {
        response.setSummaryCount(s.getContainerState(), s.getCount());
    }
    return Response.ok(response).build();
}
Also used : UnhealthyContainerMetadata(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainerMetadata) WebApplicationException(javax.ws.rs.WebApplicationException) ArrayList(java.util.ArrayList) UnhealthyContainersResponse(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainersResponse) IOException(java.io.IOException) UnHealthyContainerStates(org.hadoop.ozone.recon.schema.ContainerSchemaDefinition.UnHealthyContainerStates) ContainerHistory(org.apache.hadoop.ozone.recon.persistence.ContainerHistory) UnhealthyContainers(org.hadoop.ozone.recon.schema.tables.pojos.UnhealthyContainers) ContainerInfo(org.apache.hadoop.hdds.scm.container.ContainerInfo) UUID(java.util.UUID) UnhealthyContainersSummary(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainersSummary) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Example 3 with ContainerHistory

use of org.apache.hadoop.ozone.recon.persistence.ContainerHistory in project ozone by apache.

the class ReconContainerManager method getAllContainerHistory.

public List<ContainerHistory> getAllContainerHistory(long containerID) {
    // First, get the existing entries from DB
    Map<UUID, ContainerReplicaHistory> resMap;
    try {
        resMap = cdbServiceProvider.getContainerReplicaHistory(containerID);
    } catch (IOException ex) {
        resMap = new HashMap<>();
        LOG.debug("Unable to retrieve container replica history from RDB.");
    }
    // Then, update the entries with the latest in-memory info, if available
    if (replicaHistoryMap != null) {
        Map<UUID, ContainerReplicaHistory> replicaLastSeenMap = replicaHistoryMap.get(containerID);
        if (replicaLastSeenMap != null) {
            Map<UUID, ContainerReplicaHistory> finalResMap = resMap;
            replicaLastSeenMap.forEach((k, v) -> finalResMap.merge(k, v, (old, latest) -> latest));
            resMap = finalResMap;
        }
    }
    // Finally, convert map to list for output
    List<ContainerHistory> resList = new ArrayList<>();
    for (Map.Entry<UUID, ContainerReplicaHistory> entry : resMap.entrySet()) {
        final UUID uuid = entry.getKey();
        String hostname = "N/A";
        // Attempt to retrieve hostname from NODES table
        if (nodeDB != null) {
            try {
                DatanodeDetails dnDetails = nodeDB.get(uuid);
                if (dnDetails != null) {
                    hostname = dnDetails.getHostName();
                }
            } catch (IOException ex) {
                LOG.debug("Unable to retrieve from NODES table of node {}. {}", uuid, ex.getMessage());
            }
        }
        final long firstSeenTime = entry.getValue().getFirstSeenTime();
        final long lastSeenTime = entry.getValue().getLastSeenTime();
        long bcsId = entry.getValue().getBcsId();
        resList.add(new ContainerHistory(containerID, uuid.toString(), hostname, firstSeenTime, lastSeenTime, bcsId));
    }
    return resList;
}
Also used : ContainerReplicaNotFoundException(org.apache.hadoop.hdds.scm.container.ContainerReplicaNotFoundException) HddsProtos(org.apache.hadoop.hdds.protocol.proto.HddsProtos) ContainerReplicaProto(org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.ContainerReplicaProto) ContainerNotFoundException(org.apache.hadoop.hdds.scm.container.ContainerNotFoundException) LoggerFactory(org.slf4j.LoggerFactory) HashMap(java.util.HashMap) DBStore(org.apache.hadoop.hdds.utils.db.DBStore) ArrayList(java.util.ArrayList) FINALIZE(org.apache.hadoop.hdds.protocol.proto.HddsProtos.LifeCycleEvent.FINALIZE) ContainerReplica(org.apache.hadoop.hdds.scm.container.ContainerReplica) SequenceIdGenerator(org.apache.hadoop.hdds.scm.ha.SequenceIdGenerator) ContainerHistory(org.apache.hadoop.ozone.recon.persistence.ContainerHistory) ReconContainerMetadataManager(org.apache.hadoop.ozone.recon.spi.ReconContainerMetadataManager) StorageContainerServiceProvider(org.apache.hadoop.ozone.recon.spi.StorageContainerServiceProvider) Map(java.util.Map) Configuration(org.apache.hadoop.conf.Configuration) SCMHAManager(org.apache.hadoop.hdds.scm.ha.SCMHAManager) Logger(org.slf4j.Logger) ContainerWithPipeline(org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) DatanodeDetails(org.apache.hadoop.hdds.protocol.DatanodeDetails) IOException(java.io.IOException) ContainerID(org.apache.hadoop.hdds.scm.container.ContainerID) ContainerHealthSchemaManager(org.apache.hadoop.ozone.recon.persistence.ContainerHealthSchemaManager) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) PipelineManager(org.apache.hadoop.hdds.scm.pipeline.PipelineManager) List(java.util.List) Comparator.comparingLong(java.util.Comparator.comparingLong) ContainerManagerImpl(org.apache.hadoop.hdds.scm.container.ContainerManagerImpl) Table(org.apache.hadoop.hdds.utils.db.Table) PipelineID(org.apache.hadoop.hdds.scm.pipeline.PipelineID) VisibleForTesting(com.google.common.annotations.VisibleForTesting) ContainerInfo(org.apache.hadoop.hdds.scm.container.ContainerInfo) HashMap(java.util.HashMap) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) ArrayList(java.util.ArrayList) IOException(java.io.IOException) ContainerHistory(org.apache.hadoop.ozone.recon.persistence.ContainerHistory) DatanodeDetails(org.apache.hadoop.hdds.protocol.DatanodeDetails) UUID(java.util.UUID) HashMap(java.util.HashMap) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap)

Example 4 with ContainerHistory

use of org.apache.hadoop.ozone.recon.persistence.ContainerHistory in project ozone by apache.

the class ContainerEndpoint method getMissingContainers.

/**
 * Return
 * {@link org.apache.hadoop.ozone.recon.api.types.MissingContainerMetadata}
 * for all missing containers.
 *
 * @return {@link Response}
 */
@GET
@Path("/missing")
public Response getMissingContainers() {
    List<MissingContainerMetadata> missingContainers = new ArrayList<>();
    containerHealthSchemaManager.getUnhealthyContainers(UnHealthyContainerStates.MISSING, 0, Integer.MAX_VALUE).forEach(container -> {
        long containerID = container.getContainerId();
        try {
            ContainerInfo containerInfo = containerManager.getContainer(ContainerID.valueOf(containerID));
            long keyCount = containerInfo.getNumberOfKeys();
            UUID pipelineID = containerInfo.getPipelineID().getId();
            List<ContainerHistory> datanodes = containerManager.getLatestContainerHistory(containerID, containerInfo.getReplicationConfig().getRequiredNodes());
            missingContainers.add(new MissingContainerMetadata(containerID, container.getInStateSince(), keyCount, pipelineID, datanodes));
        } catch (IOException ioEx) {
            throw new WebApplicationException(ioEx, Response.Status.INTERNAL_SERVER_ERROR);
        }
    });
    MissingContainersResponse response = new MissingContainersResponse(missingContainers.size(), missingContainers);
    return Response.ok(response).build();
}
Also used : WebApplicationException(javax.ws.rs.WebApplicationException) MissingContainerMetadata(org.apache.hadoop.ozone.recon.api.types.MissingContainerMetadata) ContainerHistory(org.apache.hadoop.ozone.recon.persistence.ContainerHistory) ArrayList(java.util.ArrayList) ContainerInfo(org.apache.hadoop.hdds.scm.container.ContainerInfo) IOException(java.io.IOException) MissingContainersResponse(org.apache.hadoop.ozone.recon.api.types.MissingContainersResponse) UUID(java.util.UUID) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Example 5 with ContainerHistory

use of org.apache.hadoop.ozone.recon.persistence.ContainerHistory in project ozone by apache.

the class TestContainerEndpoint method testUnhealthyContainers.

@Test
public void testUnhealthyContainers() throws IOException {
    Response response = containerEndpoint.getUnhealthyContainers(1000, 1);
    UnhealthyContainersResponse responseObject = (UnhealthyContainersResponse) response.getEntity();
    assertEquals(0, responseObject.getMissingCount());
    assertEquals(0, responseObject.getOverReplicatedCount());
    assertEquals(0, responseObject.getUnderReplicatedCount());
    assertEquals(0, responseObject.getMisReplicatedCount());
    assertEquals(Collections.EMPTY_LIST, responseObject.getContainers());
    putContainerInfos(14);
    uuid1 = newDatanode("host1", "127.0.0.1");
    uuid2 = newDatanode("host2", "127.0.0.2");
    uuid3 = newDatanode("host3", "127.0.0.3");
    uuid4 = newDatanode("host4", "127.0.0.4");
    createUnhealthyRecords(5, 4, 3, 2);
    response = containerEndpoint.getUnhealthyContainers(1000, 1);
    responseObject = (UnhealthyContainersResponse) response.getEntity();
    assertEquals(5, responseObject.getMissingCount());
    assertEquals(4, responseObject.getOverReplicatedCount());
    assertEquals(3, responseObject.getUnderReplicatedCount());
    assertEquals(2, responseObject.getMisReplicatedCount());
    Collection<UnhealthyContainerMetadata> records = responseObject.getContainers();
    List<UnhealthyContainerMetadata> missing = records.stream().filter(r -> r.getContainerState().equals(UnHealthyContainerStates.MISSING.toString())).collect(Collectors.toList());
    assertEquals(5, missing.size());
    assertEquals(3, missing.get(0).getExpectedReplicaCount());
    assertEquals(0, missing.get(0).getActualReplicaCount());
    assertEquals(3, missing.get(0).getReplicaDeltaCount());
    assertEquals(12345L, missing.get(0).getUnhealthySince());
    assertEquals(1L, missing.get(0).getContainerID());
    assertEquals(keyCount, missing.get(0).getKeys());
    assertEquals(pipelineID.getId(), missing.get(0).getPipelineID());
    assertEquals(3, missing.get(0).getReplicas().size());
    assertNull(missing.get(0).getReason());
    Set<String> datanodes = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("host2", "host3", "host4")));
    List<ContainerHistory> containerReplicas = missing.get(0).getReplicas();
    containerReplicas.forEach(history -> {
        Assert.assertTrue(datanodes.contains(history.getDatanodeHost()));
    });
    List<UnhealthyContainerMetadata> overRep = records.stream().filter(r -> r.getContainerState().equals(UnHealthyContainerStates.OVER_REPLICATED.toString())).collect(Collectors.toList());
    assertEquals(4, overRep.size());
    assertEquals(3, overRep.get(0).getExpectedReplicaCount());
    assertEquals(5, overRep.get(0).getActualReplicaCount());
    assertEquals(-2, overRep.get(0).getReplicaDeltaCount());
    assertEquals(12345L, overRep.get(0).getUnhealthySince());
    assertEquals(6L, overRep.get(0).getContainerID());
    assertNull(overRep.get(0).getReason());
    List<UnhealthyContainerMetadata> underRep = records.stream().filter(r -> r.getContainerState().equals(UnHealthyContainerStates.UNDER_REPLICATED.toString())).collect(Collectors.toList());
    assertEquals(3, underRep.size());
    assertEquals(3, underRep.get(0).getExpectedReplicaCount());
    assertEquals(1, underRep.get(0).getActualReplicaCount());
    assertEquals(2, underRep.get(0).getReplicaDeltaCount());
    assertEquals(12345L, underRep.get(0).getUnhealthySince());
    assertEquals(10L, underRep.get(0).getContainerID());
    assertNull(underRep.get(0).getReason());
    List<UnhealthyContainerMetadata> misRep = records.stream().filter(r -> r.getContainerState().equals(UnHealthyContainerStates.MIS_REPLICATED.toString())).collect(Collectors.toList());
    assertEquals(2, misRep.size());
    assertEquals(2, misRep.get(0).getExpectedReplicaCount());
    assertEquals(1, misRep.get(0).getActualReplicaCount());
    assertEquals(1, misRep.get(0).getReplicaDeltaCount());
    assertEquals(12345L, misRep.get(0).getUnhealthySince());
    assertEquals(13L, misRep.get(0).getContainerID());
    assertEquals("some reason", misRep.get(0).getReason());
}
Also used : MissingContainersResponse(org.apache.hadoop.ozone.recon.api.types.MissingContainersResponse) KeysResponse(org.apache.hadoop.ozone.recon.api.types.KeysResponse) ContainersResponse(org.apache.hadoop.ozone.recon.api.types.ContainersResponse) Response(javax.ws.rs.core.Response) UnhealthyContainersResponse(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainersResponse) Arrays(java.util.Arrays) HddsProtos(org.apache.hadoop.hdds.protocol.proto.HddsProtos) MissingContainersResponse(org.apache.hadoop.ozone.recon.api.types.MissingContainersResponse) KeysResponse(org.apache.hadoop.ozone.recon.api.types.KeysResponse) OMMetadataManagerTestUtils.writeDataToOm(org.apache.hadoop.ozone.recon.OMMetadataManagerTestUtils.writeDataToOm) StringUtils(org.apache.commons.lang3.StringUtils) BucketLayout(org.apache.hadoop.ozone.om.helpers.BucketLayout) ReconContainerMetadataManager(org.apache.hadoop.ozone.recon.spi.ReconContainerMetadataManager) StorageContainerServiceProvider(org.apache.hadoop.ozone.recon.spi.StorageContainerServiceProvider) Map(java.util.Map) Assert.fail(org.junit.Assert.fail) ContainersResponse(org.apache.hadoop.ozone.recon.api.types.ContainersResponse) StorageContainerServiceProviderImpl(org.apache.hadoop.ozone.recon.spi.impl.StorageContainerServiceProviderImpl) UnHealthyContainerStates(org.hadoop.ozone.recon.schema.ContainerSchemaDefinition.UnHealthyContainerStates) UnhealthyContainers(org.hadoop.ozone.recon.schema.tables.pojos.UnhealthyContainers) RatisReplicationConfig(org.apache.hadoop.hdds.client.RatisReplicationConfig) OzoneManagerServiceProviderImpl(org.apache.hadoop.ozone.recon.spi.impl.OzoneManagerServiceProviderImpl) ReconContainerManager(org.apache.hadoop.ozone.recon.scm.ReconContainerManager) Collection(java.util.Collection) Set(java.util.Set) ReplicationFactor(org.apache.hadoop.hdds.protocol.proto.HddsProtos.ReplicationFactor) ContainerHealthSchemaManager(org.apache.hadoop.ozone.recon.persistence.ContainerHealthSchemaManager) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) ReconOMMetadataManager(org.apache.hadoop.ozone.recon.recovery.ReconOMMetadataManager) List(java.util.List) Response(javax.ws.rs.core.Response) UnhealthyContainerMetadata(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainerMetadata) WebApplicationException(javax.ws.rs.WebApplicationException) ContainerInfo(org.apache.hadoop.hdds.scm.container.ContainerInfo) OMMetadataManagerTestUtils.getOmKeyLocationInfo(org.apache.hadoop.ozone.recon.OMMetadataManagerTestUtils.getOmKeyLocationInfo) Mockito.mock(org.mockito.Mockito.mock) BlockID(org.apache.hadoop.hdds.client.BlockID) KeyMetadata(org.apache.hadoop.ozone.recon.api.types.KeyMetadata) ArrayList(java.util.ArrayList) OzoneStorageContainerManager(org.apache.hadoop.hdds.scm.server.OzoneStorageContainerManager) HashSet(java.util.HashSet) ContainerHistory(org.apache.hadoop.ozone.recon.persistence.ContainerHistory) OmKeyLocationInfo(org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfo) MissingContainerMetadata(org.apache.hadoop.ozone.recon.api.types.MissingContainerMetadata) Before(org.junit.Before) OMMetadataManagerTestUtils.getRandomPipeline(org.apache.hadoop.ozone.recon.OMMetadataManagerTestUtils.getRandomPipeline) Iterator(java.util.Iterator) ContainerWithPipeline(org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline) OMMetadataManagerTestUtils.initializeNewOmMetadataManager(org.apache.hadoop.ozone.recon.OMMetadataManagerTestUtils.initializeNewOmMetadataManager) ContainerKeyMapperTask(org.apache.hadoop.ozone.recon.tasks.ContainerKeyMapperTask) Assert.assertTrue(org.junit.Assert.assertTrue) DatanodeDetails(org.apache.hadoop.hdds.protocol.DatanodeDetails) IOException(java.io.IOException) ContainerID(org.apache.hadoop.hdds.scm.container.ContainerID) Pipeline(org.apache.hadoop.hdds.scm.pipeline.Pipeline) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) ContainerSchemaDefinition(org.hadoop.ozone.recon.schema.ContainerSchemaDefinition) ContainerMetadata(org.apache.hadoop.ozone.recon.api.types.ContainerMetadata) UnhealthyContainersResponse(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainersResponse) OMMetadataManagerTestUtils.getTestReconOmMetadataManager(org.apache.hadoop.ozone.recon.OMMetadataManagerTestUtils.getTestReconOmMetadataManager) Assert.assertNull(org.junit.Assert.assertNull) Rule(org.junit.Rule) OmKeyLocationInfoGroup(org.apache.hadoop.ozone.om.helpers.OmKeyLocationInfoGroup) Table(org.apache.hadoop.hdds.utils.db.Table) PipelineID(org.apache.hadoop.hdds.scm.pipeline.PipelineID) ReconStorageContainerManagerFacade(org.apache.hadoop.ozone.recon.scm.ReconStorageContainerManagerFacade) ReconPipelineManager(org.apache.hadoop.ozone.recon.scm.ReconPipelineManager) ReconTestInjector(org.apache.hadoop.ozone.recon.ReconTestInjector) Assert(org.junit.Assert) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) TemporaryFolder(org.junit.rules.TemporaryFolder) OMMetadataManager(org.apache.hadoop.ozone.om.OMMetadataManager) UnhealthyContainerMetadata(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainerMetadata) ContainerHistory(org.apache.hadoop.ozone.recon.persistence.ContainerHistory) UnhealthyContainersResponse(org.apache.hadoop.ozone.recon.api.types.UnhealthyContainersResponse) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)6 UUID (java.util.UUID)6 ContainerHistory (org.apache.hadoop.ozone.recon.persistence.ContainerHistory)6 IOException (java.io.IOException)4 ContainerInfo (org.apache.hadoop.hdds.scm.container.ContainerInfo)4 MissingContainersResponse (org.apache.hadoop.ozone.recon.api.types.MissingContainersResponse)4 UnhealthyContainersResponse (org.apache.hadoop.ozone.recon.api.types.UnhealthyContainersResponse)4 List (java.util.List)3 WebApplicationException (javax.ws.rs.WebApplicationException)3 Response (javax.ws.rs.core.Response)3 ContainersResponse (org.apache.hadoop.ozone.recon.api.types.ContainersResponse)3 KeysResponse (org.apache.hadoop.ozone.recon.api.types.KeysResponse)3 MissingContainerMetadata (org.apache.hadoop.ozone.recon.api.types.MissingContainerMetadata)3 Map (java.util.Map)2 Collectors (java.util.stream.Collectors)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 DatanodeDetails (org.apache.hadoop.hdds.protocol.DatanodeDetails)2 HddsProtos (org.apache.hadoop.hdds.protocol.proto.HddsProtos)2 ContainerID (org.apache.hadoop.hdds.scm.container.ContainerID)2