Uh oh!
There was an error while loading. Please reload this page.
HDDS-1651. Create a http.policy config for Ozone - #930
Conversation
Change-Id: Ia284f685f6d39a512124e6055537615d325ae96b
hadoop-yetus
commented
Jun 8, 2019
💔 -1 overall
This message was automatically generated. |
| public static final int DFS_CONTAINER_RATIS_IPC_PORT_DEFAULT = 9858; | ||
| public static final String OZONE_HTTP_POLICY = "ozone.http.policy"; | ||
There was a problem hiding this comment.
This newly added property should be used during HTTP server start.
That part is missing.
There was a problem hiding this comment.
Minor NIT: ozone.http.policy -> Use OzoneConfigKeys.OZONE_HTTP_POLICY.
There was a problem hiding this comment.
This line get() second param value should be a default value for the property.
Change-Id: I047aafc733c936fb82f926bcde489595cf51d928
There was a problem hiding this comment.
Why do we need to set it back?
There was a problem hiding this comment.
Thank You @shwetayakkali for the contribution.
I have a few comments.
| 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); | ||
| } |
There was a problem hiding this 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.
hadoop-yetus
commented
Jun 14, 2019
💔 -1 overall
This message was automatically generated. |
hadoop-yetus
commented
Jun 14, 2019
💔 -1 overall
This message was automatically generated. |
bharatviswa504
commented
Jun 14, 2019
One more comment, we need to change the code in OzoneManagerSnapShotProvider class, to use this newly added method. Line 89: this.httpPolicy = DFSUtil.getHttpPolicy(conf); |
Change-Id: I23b1ddc619488bb290be9136a18ec5e2aab7dd77
hadoop-yetus
commented
Jun 19, 2019
💔 -1 overall
This message was automatically generated. |
Hi, I feel ozone can also re-use the hdfs config. In this way, we don't miss the code changes where HTTP policy is being used, like OzoneManagerSnapShotProvider which uses still DFSUtils.getHttpPolicy. And also we use to create HttpServer2.Builder builder with below code. That again uses dfs.http.policy. So, this is the reason we need to set ozone.http.policy to dfs.http.policy to make it work. So, I feel to avoid all these, we can use dfs.http.policy as before. Let me know your thoughts on this. |
| import java.util.Optional; | ||
| import java.util.TimeZone; | ||
| import org.apache.hadoop.HadoopIllegalArgumentException; |
There was a problem hiding this comment.
+1 for using dfs.http..policy to reduce redundant config knobs.
There was a problem hiding this comment.
Thank You @eyanghwx for review.
I also feel the same. Can we close this as won't Fix?
There was a problem hiding this comment.
Thank You @eyanghwx for the confirmation.
I will close this as Won't fix.
bharatviswa504
commented
Jun 28, 2019
Thank You @shwetayakkali for the contribution. |
Change-Id: Ia284f685f6d39a512124e6055537615d325ae96b