xichen01 commented on code in PR #10946:
URL: https://github.com/apache/ozone/pull/10946#discussion_r3777539986


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -729,6 +733,10 @@ private OzoneManager(OzoneConfiguration conf, 
StartupOption startupOption)
     omClientProtocolMetrics = ProtocolMessageMetrics
         .create("OmClientProtocol", "Ozone Manager RPC endpoint",
             OzoneManagerProtocolProtos.Type.class);
+    String configuredStoragePolicy = conf.get(
+        OZONE_DEFAULT_STORAGE_POLICY_KEY, 
OZONE_DEFAULT_STORAGE_POLICY_DEFAULT);
+    OzoneStoragePolicy.setDefaultPolicy(OzoneStoragePolicy.valueOf(

Review Comment:
   > Will that work if OM and SCM are the separate JVMs? SCM always sees the 
hardcoded WARM, and ozone.default.storagepolicy has no effect
   
   If OM is a version that supports storage policy, 
`ScmBlockLocationProtocolServerSideTranslatorPB#allocateScmBlock` will use the 
storage policy specified by OM instead of `ozone.default.storagepolicy`.
   
   The fallback code in 
`ScmBlockLocationProtocolServerSideTranslatorPB#allocateScmBlock` was added to 
ensure compatibility between older versions of OM and newer versions of SCM.
   
   `ozone.default.storagepolicy` was added for compatibility with older 
versions of the client, since those versions do not specify a storage policy.
   
   When all components are updated to the latest version, these default 
configurations will not be used.
   
   



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

Reply via email to