Revert "HDDS-1310. In datanode once a container becomes unhealthy, datanode restart fails. Contributed by Sandeep Nemuri."
This reverts commit efad5717ec
.
This commit is contained in:
parent
efad5717ec
commit
771ea6b5e7
|
@ -623,9 +623,6 @@ public class KeyValueContainer implements Container<KeyValueContainerData> {
|
|||
case CLOSED:
|
||||
state = ContainerReplicaProto.State.CLOSED;
|
||||
break;
|
||||
case UNHEALTHY:
|
||||
state = ContainerReplicaProto.State.UNHEALTHY;
|
||||
break;
|
||||
default:
|
||||
throw new StorageContainerException("Invalid Container state found: " +
|
||||
containerData.getContainerID(), INVALID_CONTAINER_STATE);
|
||||
|
|
|
@ -332,19 +332,6 @@ public class TestKeyValueContainer {
|
|||
keyValueContainerData.getState());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReportOfUnhealthyContainer() throws Exception {
|
||||
keyValueContainer.create(volumeSet, volumeChoosingPolicy, scmId);
|
||||
Assert.assertNotNull(keyValueContainer.getContainerReport());
|
||||
keyValueContainer.markContainerUnhealthy();
|
||||
File containerFile = keyValueContainer.getContainerFile();
|
||||
keyValueContainerData = (KeyValueContainerData) ContainerDataYaml
|
||||
.readContainerFile(containerFile);
|
||||
assertEquals(ContainerProtos.ContainerDataProto.State.UNHEALTHY,
|
||||
keyValueContainerData.getState());
|
||||
Assert.assertNotNull(keyValueContainer.getContainerReport());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateContainer() throws IOException {
|
||||
keyValueContainer.create(volumeSet, volumeChoosingPolicy, scmId);
|
||||
|
|
Loading…
Reference in New Issue