xichen01 commented on code in PR #10946:
URL: https://github.com/apache/ozone/pull/10946#discussion_r3786498970
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/ScmBlockLocationProtocolServerSideTranslatorPB.java:
##########
@@ -202,20 +209,24 @@ public AllocateScmBlockResponseProto allocateScmBlock(
request.getEcReplicationConfig()),
request.getOwner(),
ExcludeList.getFromProtoBuf(request.getExcludeList()),
- request.getClient());
+ request.getClient(),
+ storagePolicy,
+ request.getAllowFallBack());
AllocateScmBlockResponseProto.Builder builder =
AllocateScmBlockResponseProto.newBuilder();
if (allocatedBlocks.size() < request.getNumBlocks()) {
throw new SCMException("Allocated " + allocatedBlocks.size() +
- " blocks. Requested " + request.getNumBlocks() + " blocks",
- SCMException.ResultCodes.FAILED_TO_ALLOCATE_ENOUGH_BLOCKS);
+ " blocks. Requested " + request.getNumBlocks() + " blocks.
StoragePolicy " +
+ storagePolicy,
SCMException.ResultCodes.FAILED_TO_ALLOCATE_ENOUGH_BLOCKS);
}
for (AllocatedBlock block : allocatedBlocks) {
builder.addBlocks(AllocateBlockResponse.newBuilder()
.setContainerBlockID(block.getBlockID().getProtobuf())
- .setPipeline(block.getPipeline().getProtobufMessage(clientVersion,
Name.IO_PORTS)));
+ .setPipeline(block.getPipeline().getProtobufMessage(clientVersion,
Name.IO_PORTS))
+ .setStorageTier(block.getStorageTier().toProto())
Review Comment:
Yes, this has been fixed in subsequent implementations, but it would be best
to address it here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]