elek commented on a change in pull request #2069:
URL: https://github.com/apache/ozone/pull/2069#discussion_r625039024



##########
File path: 
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerDataYaml.java
##########
@@ -179,44 +180,7 @@ public void testIncorrectContainerFile() throws 
IOException{
       GenericTestUtils.assertExceptionContains("No enum constant", ex);
     }
   }
-
-

Review comment:
       > With ignoring replIndex =0, for EC disabled clusters should not have 
any impact right?
   
   Sorry, I am not sure if I understood this question.
   
   2. Today we have a generic code to serialize all the white-listed fields. It 
can be modified to support default values and write out spefic if it has a 
value different from the default, but it requires some code re-organization.
   
   1. Even if we do this (do not write replIndex to the container file for non 
EC containers) it doesn't help the backward compatible problem. When a new EC 
type of container is written (eg. replIndex=1) it couldn't be read by the old 
cluster code (as it's not known if it's an EC container or not). Therefore, we 
should enable to write the replIndex only after the finalize step). In this 
case there is no advantage to write or not write `replIndex` to   the container 
yaml file for normal containers. (It's more like a code style question, if you 
think it's worth to add more code re-organization for this, I am fine to add 
it, but from behavior point of view we will have the same results).




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to