diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java index ee232db73e..d92eb17a70 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/HddsDispatcher.java @@ -168,19 +168,8 @@ private void sendCloseContainerActionIfNeeded(Container container) { double containerUsedPercentage = 1.0f * containerData.getBytesUsed() / StorageUnit.GB.toBytes(containerData.getMaxSizeGB()); if (containerUsedPercentage >= containerCloseThreshold) { - - ContainerInfo containerInfo = ContainerInfo.newBuilder() - .setContainerID(containerData.getContainerID()) - .setReadCount(containerData.getReadCount()) - .setWriteCount(containerData.getWriteCount()) - .setReadBytes(containerData.getReadBytes()) - .setWriteBytes(containerData.getWriteBytes()) - .setUsed(containerData.getBytesUsed()) - .setState(HddsProtos.LifeCycleState.OPEN) - .build(); - ContainerAction action = ContainerAction.newBuilder() - .setContainer(containerInfo) + .setContainerID(containerData.getContainerID()) .setAction(ContainerAction.Action.CLOSE) .setReason(ContainerAction.Reason.CONTAINER_FULL) .build(); diff --git a/hadoop-hdds/container-service/src/main/proto/StorageContainerDatanodeProtocol.proto b/hadoop-hdds/container-service/src/main/proto/StorageContainerDatanodeProtocol.proto index 0c52efb74c..71c41e3532 100644 --- a/hadoop-hdds/container-service/src/main/proto/StorageContainerDatanodeProtocol.proto +++ b/hadoop-hdds/container-service/src/main/proto/StorageContainerDatanodeProtocol.proto @@ -157,7 +157,7 @@ message ContainerAction { CONTAINER_FULL = 1; } - required ContainerInfo container = 1; + required int64 containerID = 1; required Action action = 2; optional Reason reason = 3; } diff --git a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/states/endpoint/TestHeartbeatEndpointTask.java b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/states/endpoint/TestHeartbeatEndpointTask.java index b4d718d4ff..13de11f431 100644 --- a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/states/endpoint/TestHeartbeatEndpointTask.java +++ b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/states/endpoint/TestHeartbeatEndpointTask.java @@ -289,10 +289,7 @@ private HeartbeatEndpointTask getHeartbeatEndpointTask( private ContainerAction getContainerAction() { ContainerAction.Builder builder = ContainerAction.newBuilder(); - ContainerInfo containerInfo = ContainerInfo.newBuilder() - .setContainerID(1L) - .build(); - builder.setContainer(containerInfo) + builder.setContainerID(1L) .setAction(ContainerAction.Action.CLOSE) .setReason(ContainerAction.Reason.CONTAINER_FULL); return builder.build();