amaliujia commented on code in PR #11926:
URL: https://github.com/apache/ozone/pull/11926#discussion_r4493834483
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ContainerImporter.java:
##########
@@ -121,6 +125,11 @@ public void importContainer(long containerID, Path
tarFilePath,
}
ContainerUtils.verifyContainerFileChecksum(containerData, conf);
containerData.setVolume(targetVolume);
+ // Preserve the replica's recorded type, which can differ from a
relabelled volume's type.
+ // Initialise missing legacy metadata from the destination volume;
reports also expose the volume type separately.
+ if (containerData.getStorageType() == null) {
Review Comment:
I am trying to understand this:
Why we have to match the containerData with the physical volume storage type
when no storage type exists?
My understanding is a `containerData` without a storage type means a legacy
container which was created prior to the feature. Why we have to assign a
storage type to such containers?
##########
hadoop-hdds/interface-client/src/main/proto/DatanodeClientProtocol.proto:
##########
@@ -577,6 +577,9 @@ message SendContainerRequest {
optional int64 checksum = 4;
optional CopyContainerCompressProto compression = 5;
optional int64 size = 6;
+ // StorageType the importing datanode should place the container on. Sent on
+ // the first request only, alongside size. Absent from older senders.
+ optional int32 storageTypeID = 7;
Review Comment:
`StorageTypeProto` is arealdy defined as proto, curious why we do not use 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]