diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CloseContainerCommandHandler.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CloseContainerCommandHandler.java index ac9d24e8441..d4c3ff722ad 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CloseContainerCommandHandler.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CloseContainerCommandHandler.java @@ -39,7 +39,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; -import java.util.UUID; /** * Handler for close container command received from SCM. @@ -138,7 +137,6 @@ public class CloseContainerCommandHandler implements CommandHandler { command.setContainerID(containerId); command.setCloseContainer( ContainerProtos.CloseContainerRequestProto.getDefaultInstance()); - command.setTraceID(UUID.randomUUID().toString()); command.setDatanodeUuid(datanodeDetails.getUuidString()); return command.build(); } diff --git a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java index 6e37b4c0b9d..d4258201936 100644 --- a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java +++ b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestHddsDispatcher.java @@ -266,7 +266,6 @@ public class TestHddsDispatcher { .newBuilder() .setContainerID(containerId) .setCmdType(ContainerProtos.Type.WriteChunk) - .setTraceID(UUID.randomUUID().toString()) .setDatanodeUuid(datanodeId) .setWriteChunk(writeChunkRequest) .build(); diff --git a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java index 731e74c19ce..7962cb2f3b0 100644 --- a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java +++ b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java @@ -305,7 +305,6 @@ public class TestCloseContainerCommandHandler { request.setContainerID(containerId.getId()); request.setCreateContainer( ContainerProtos.CreateContainerRequestProto.getDefaultInstance()); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(datanodeDetails.getUuidString()); ozoneContainer.getWriteChannel().submitRequest( request.build(), pipelineID.getProtobuf()); diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java index a8b72954b6d..5739d48c652 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java @@ -43,7 +43,6 @@ import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.List; -import java.util.UUID; import java.util.concurrent.TimeUnit; import static org.apache.hadoop.hdds.HddsConfigKeys. @@ -181,7 +180,6 @@ public class TestContainerStateMachineFailures { request.setContainerID(containerID); request.setCreateContainer( ContainerProtos.CreateContainerRequestProto.getDefaultInstance()); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid( cluster.getHddsDatanodes().get(0).getDatanodeDetails().getUuidString()); Assert.assertEquals(ContainerProtos.Result.CONTAINER_MISSING, diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java index dc5e8b43bbf..93807b4c2cd 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java @@ -239,7 +239,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.WriteChunk); request.setContainerID(blockID.getContainerID()); request.setWriteChunk(writeRequest); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); @@ -281,7 +280,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.PutSmallFile); request.setContainerID(blockID.getContainerID()); request.setPutSmallFile(smallFileRequest); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); } @@ -300,7 +298,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.GetSmallFile); request.setContainerID(getKey.getGetBlock().getBlockID().getContainerID()); request.setGetSmallFile(smallFileRequest); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); } @@ -330,7 +327,6 @@ public final class ContainerTestHelper { newRequest.setCmdType(ContainerProtos.Type.ReadChunk); newRequest.setContainerID(readRequest.getBlockID().getContainerID()); newRequest.setReadChunk(readRequest); - newRequest.setTraceID(UUID.randomUUID().toString()); newRequest.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return newRequest.build(); } @@ -363,7 +359,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.DeleteChunk); request.setContainerID(writeRequest.getBlockID().getContainerID()); request.setDeleteChunk(deleteRequest); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); } @@ -402,7 +397,6 @@ public final class ContainerTestHelper { request.setContainerID(containerID); request.setCreateContainer( ContainerProtos.CreateContainerRequestProto.getDefaultInstance()); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request; @@ -455,7 +449,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.UpdateContainer); request.setContainerID(containerID); request.setUpdateContainer(updateRequestBuilder.build()); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); } @@ -506,7 +499,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.PutBlock); request.setContainerID(blockData.getContainerID()); request.setPutBlock(putRequest); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); } @@ -534,7 +526,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.GetBlock); request.setContainerID(blockID.getContainerID()); request.setGetBlock(getRequest); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); } @@ -571,7 +562,6 @@ public final class ContainerTestHelper { request.setCmdType(ContainerProtos.Type.DeleteBlock); request.setContainerID(blockID.getContainerID()); request.setDeleteBlock(delRequest); - request.setTraceID(UUID.randomUUID().toString()); request.setDatanodeUuid(pipeline.getFirstNode().getUuidString()); return request.build(); } @@ -590,7 +580,6 @@ public final class ContainerTestHelper { .setContainerID(containerID) .setCloseContainer( ContainerProtos.CloseContainerRequestProto.getDefaultInstance()) - .setTraceID(UUID.randomUUID().toString()) .setDatanodeUuid(pipeline.getFirstNode().getUuidString()) .build(); @@ -635,7 +624,6 @@ public final class ContainerTestHelper { .setDeleteContainer( ContainerProtos.DeleteContainerRequestProto.getDefaultInstance()) .setDeleteContainer(deleteRequest) - .setTraceID(UUID.randomUUID().toString()) .setDatanodeUuid(pipeline.getFirstNode().getUuidString()) .build(); }