ChenSammi commented on code in PR #3346:
URL: https://github.com/apache/ozone/pull/3346#discussion_r864446190
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -942,9 +941,14 @@ public Container importContainer(ContainerData
originalContainerData,
final InputStream rawContainerStream,
final TarContainerPacker packer)
throws IOException {
+ Preconditions.checkState(originalContainerData instanceof
+ KeyValueContainerData, "Should be KeyValueContainerData instance");
KeyValueContainerData containerData =
new KeyValueContainerData(originalContainerData);
+ // schemaVersion should be used to decide the container db path
+ containerData.setSchemaVersion(
+ ((KeyValueContainerData) originalContainerData).getSchemaVersion());
Review Comment:
Move this schemaVersion set into KeyValueContainerData(ContainerData data)
constructor, change the constructor parameter type to KeyValueContainerData
instead.
--
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]