parent
75ba719ddd
commit
abace709cc
@ -39,7 +39,6 @@
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for close container command received from SCM.
|
* Handler for close container command received from SCM.
|
||||||
@ -138,7 +137,6 @@ private ContainerCommandRequestProto getContainerCommandRequestProto(
|
|||||||
command.setContainerID(containerId);
|
command.setContainerID(containerId);
|
||||||
command.setCloseContainer(
|
command.setCloseContainer(
|
||||||
ContainerProtos.CloseContainerRequestProto.getDefaultInstance());
|
ContainerProtos.CloseContainerRequestProto.getDefaultInstance());
|
||||||
command.setTraceID(UUID.randomUUID().toString());
|
|
||||||
command.setDatanodeUuid(datanodeDetails.getUuidString());
|
command.setDatanodeUuid(datanodeDetails.getUuidString());
|
||||||
return command.build();
|
return command.build();
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,6 @@ private ContainerCommandRequestProto getWriteChunkRequest(
|
|||||||
.newBuilder()
|
.newBuilder()
|
||||||
.setContainerID(containerId)
|
.setContainerID(containerId)
|
||||||
.setCmdType(ContainerProtos.Type.WriteChunk)
|
.setCmdType(ContainerProtos.Type.WriteChunk)
|
||||||
.setTraceID(UUID.randomUUID().toString())
|
|
||||||
.setDatanodeUuid(datanodeId)
|
.setDatanodeUuid(datanodeId)
|
||||||
.setWriteChunk(writeChunkRequest)
|
.setWriteChunk(writeChunkRequest)
|
||||||
.build();
|
.build();
|
||||||
|
@ -305,7 +305,6 @@ private Container createContainer(final Configuration conf,
|
|||||||
request.setContainerID(containerId.getId());
|
request.setContainerID(containerId.getId());
|
||||||
request.setCreateContainer(
|
request.setCreateContainer(
|
||||||
ContainerProtos.CreateContainerRequestProto.getDefaultInstance());
|
ContainerProtos.CreateContainerRequestProto.getDefaultInstance());
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(datanodeDetails.getUuidString());
|
request.setDatanodeUuid(datanodeDetails.getUuidString());
|
||||||
ozoneContainer.getWriteChannel().submitRequest(
|
ozoneContainer.getWriteChannel().submitRequest(
|
||||||
request.build(), pipelineID.getProtobuf());
|
request.build(), pipelineID.getProtobuf());
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static org.apache.hadoop.hdds.HddsConfigKeys.
|
import static org.apache.hadoop.hdds.HddsConfigKeys.
|
||||||
@ -181,7 +180,6 @@ public void testContainerStateMachineFailures() throws Exception {
|
|||||||
request.setContainerID(containerID);
|
request.setContainerID(containerID);
|
||||||
request.setCreateContainer(
|
request.setCreateContainer(
|
||||||
ContainerProtos.CreateContainerRequestProto.getDefaultInstance());
|
ContainerProtos.CreateContainerRequestProto.getDefaultInstance());
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(
|
request.setDatanodeUuid(
|
||||||
cluster.getHddsDatanodes().get(0).getDatanodeDetails().getUuidString());
|
cluster.getHddsDatanodes().get(0).getDatanodeDetails().getUuidString());
|
||||||
Assert.assertEquals(ContainerProtos.Result.CONTAINER_MISSING,
|
Assert.assertEquals(ContainerProtos.Result.CONTAINER_MISSING,
|
||||||
|
@ -239,7 +239,6 @@ public static ContainerCommandRequestProto getWriteChunkRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.WriteChunk);
|
request.setCmdType(ContainerProtos.Type.WriteChunk);
|
||||||
request.setContainerID(blockID.getContainerID());
|
request.setContainerID(blockID.getContainerID());
|
||||||
request.setWriteChunk(writeRequest);
|
request.setWriteChunk(writeRequest);
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
|
|
||||||
return request.build();
|
return request.build();
|
||||||
@ -281,7 +280,6 @@ public static ContainerCommandRequestProto getWriteSmallFileRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.PutSmallFile);
|
request.setCmdType(ContainerProtos.Type.PutSmallFile);
|
||||||
request.setContainerID(blockID.getContainerID());
|
request.setContainerID(blockID.getContainerID());
|
||||||
request.setPutSmallFile(smallFileRequest);
|
request.setPutSmallFile(smallFileRequest);
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return request.build();
|
return request.build();
|
||||||
}
|
}
|
||||||
@ -300,7 +298,6 @@ public static ContainerCommandRequestProto getReadSmallFileRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.GetSmallFile);
|
request.setCmdType(ContainerProtos.Type.GetSmallFile);
|
||||||
request.setContainerID(getKey.getGetBlock().getBlockID().getContainerID());
|
request.setContainerID(getKey.getGetBlock().getBlockID().getContainerID());
|
||||||
request.setGetSmallFile(smallFileRequest);
|
request.setGetSmallFile(smallFileRequest);
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return request.build();
|
return request.build();
|
||||||
}
|
}
|
||||||
@ -330,7 +327,6 @@ public static ContainerCommandRequestProto getReadChunkRequest(
|
|||||||
newRequest.setCmdType(ContainerProtos.Type.ReadChunk);
|
newRequest.setCmdType(ContainerProtos.Type.ReadChunk);
|
||||||
newRequest.setContainerID(readRequest.getBlockID().getContainerID());
|
newRequest.setContainerID(readRequest.getBlockID().getContainerID());
|
||||||
newRequest.setReadChunk(readRequest);
|
newRequest.setReadChunk(readRequest);
|
||||||
newRequest.setTraceID(UUID.randomUUID().toString());
|
|
||||||
newRequest.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
newRequest.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return newRequest.build();
|
return newRequest.build();
|
||||||
}
|
}
|
||||||
@ -363,7 +359,6 @@ public static ContainerCommandRequestProto getDeleteChunkRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.DeleteChunk);
|
request.setCmdType(ContainerProtos.Type.DeleteChunk);
|
||||||
request.setContainerID(writeRequest.getBlockID().getContainerID());
|
request.setContainerID(writeRequest.getBlockID().getContainerID());
|
||||||
request.setDeleteChunk(deleteRequest);
|
request.setDeleteChunk(deleteRequest);
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return request.build();
|
return request.build();
|
||||||
}
|
}
|
||||||
@ -402,7 +397,6 @@ private static Builder getContainerCommandRequestBuilder(long containerID,
|
|||||||
request.setContainerID(containerID);
|
request.setContainerID(containerID);
|
||||||
request.setCreateContainer(
|
request.setCreateContainer(
|
||||||
ContainerProtos.CreateContainerRequestProto.getDefaultInstance());
|
ContainerProtos.CreateContainerRequestProto.getDefaultInstance());
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
@ -455,7 +449,6 @@ public static ContainerCommandRequestProto getUpdateContainerRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.UpdateContainer);
|
request.setCmdType(ContainerProtos.Type.UpdateContainer);
|
||||||
request.setContainerID(containerID);
|
request.setContainerID(containerID);
|
||||||
request.setUpdateContainer(updateRequestBuilder.build());
|
request.setUpdateContainer(updateRequestBuilder.build());
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return request.build();
|
return request.build();
|
||||||
}
|
}
|
||||||
@ -506,7 +499,6 @@ public static ContainerCommandRequestProto getPutBlockRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.PutBlock);
|
request.setCmdType(ContainerProtos.Type.PutBlock);
|
||||||
request.setContainerID(blockData.getContainerID());
|
request.setContainerID(blockData.getContainerID());
|
||||||
request.setPutBlock(putRequest);
|
request.setPutBlock(putRequest);
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return request.build();
|
return request.build();
|
||||||
}
|
}
|
||||||
@ -534,7 +526,6 @@ public static ContainerCommandRequestProto getBlockRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.GetBlock);
|
request.setCmdType(ContainerProtos.Type.GetBlock);
|
||||||
request.setContainerID(blockID.getContainerID());
|
request.setContainerID(blockID.getContainerID());
|
||||||
request.setGetBlock(getRequest);
|
request.setGetBlock(getRequest);
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return request.build();
|
return request.build();
|
||||||
}
|
}
|
||||||
@ -571,7 +562,6 @@ public static ContainerCommandRequestProto getDeleteBlockRequest(
|
|||||||
request.setCmdType(ContainerProtos.Type.DeleteBlock);
|
request.setCmdType(ContainerProtos.Type.DeleteBlock);
|
||||||
request.setContainerID(blockID.getContainerID());
|
request.setContainerID(blockID.getContainerID());
|
||||||
request.setDeleteBlock(delRequest);
|
request.setDeleteBlock(delRequest);
|
||||||
request.setTraceID(UUID.randomUUID().toString());
|
|
||||||
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
request.setDatanodeUuid(pipeline.getFirstNode().getUuidString());
|
||||||
return request.build();
|
return request.build();
|
||||||
}
|
}
|
||||||
@ -590,7 +580,6 @@ public static ContainerCommandRequestProto getCloseContainer(
|
|||||||
.setContainerID(containerID)
|
.setContainerID(containerID)
|
||||||
.setCloseContainer(
|
.setCloseContainer(
|
||||||
ContainerProtos.CloseContainerRequestProto.getDefaultInstance())
|
ContainerProtos.CloseContainerRequestProto.getDefaultInstance())
|
||||||
.setTraceID(UUID.randomUUID().toString())
|
|
||||||
.setDatanodeUuid(pipeline.getFirstNode().getUuidString())
|
.setDatanodeUuid(pipeline.getFirstNode().getUuidString())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@ -635,7 +624,6 @@ public static ContainerCommandRequestProto getDeleteContainer(
|
|||||||
.setDeleteContainer(
|
.setDeleteContainer(
|
||||||
ContainerProtos.DeleteContainerRequestProto.getDefaultInstance())
|
ContainerProtos.DeleteContainerRequestProto.getDefaultInstance())
|
||||||
.setDeleteContainer(deleteRequest)
|
.setDeleteContainer(deleteRequest)
|
||||||
.setTraceID(UUID.randomUUID().toString())
|
|
||||||
.setDatanodeUuid(pipeline.getFirstNode().getUuidString())
|
.setDatanodeUuid(pipeline.getFirstNode().getUuidString())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user