bharatviswa504 commented on a change in pull request #930: HDDS-1651. Create a 
http.policy config for Ozone
URL: https://github.com/apache/hadoop/pull/930#discussion_r293661655
 
 

 ##########
 File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsUtils.java
 ##########
 @@ -426,6 +430,20 @@ public static long getUtcTime() {
     return Calendar.getInstance(UTC_ZONE).getTimeInMillis();
   }
 
+  public static Policy getHttpPolicy(Configuration conf) {
+    String policyStr = conf.get("ozone.http.policy", 
OzoneConfigKeys.OZONE_HTTP_POLICY);
+    if(policyStr == null || policyStr.length() == 0) {
+      policyStr = conf.get("dfs.http.policy", 
DFSConfigKeys.DFS_HTTP_POLICY_DEFAULT);
+    }
 
 Review comment:
   If HTTP_ONLY is used as the default, 
   we can conf.get("OzoneConfigKeys.OZONE_HTTP_POLICY", 
DFSConfigKeys.DFS_HTTP_POLICY_DEFAULT);
   Then we don't need checks of null, and we can make this logic simple.

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


With regards,
Apache Git Services

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

Reply via email to