anuengineer commented on a change in pull request #1170: HADOOP-16398. Exports 
Hadoop metrics to Prometheus
URL: https://github.com/apache/hadoop/pull/1170#discussion_r307825817
 
 

 ##########
 File path: 
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/BaseHttpServer.java
 ##########
 @@ -70,6 +70,12 @@ public BaseHttpServer(Configuration conf, String name) 
throws IOException {
       this.httpAddress = getHttpBindAddress();
       this.httpsAddress = getHttpsBindAddress();
       HttpServer2.Builder builder = null;
+
+      // Avoid registering o.a.h.http.PrometheusServlet in HttpServer2.
+      // TODO: Replace "hadoop.prometheus.endpoint.enabled" with
+      // CommonConfigurationKeysPublic.HADOOP_PROMETHEUS_ENABLED when possible.
+      conf.setBoolean("hadoop.prometheus.endpoint.enabled", false);
+
 
 Review comment:
   @aajisaka  Just trying to understand all the options here. I see we have 3 
options of running this code.
   1. Ozone and HDFS as independent processes - No issues.
   2. HDFS starts first, and Ozone is enabled in the running process -- Works 
because the Prometheus servelet is loaded and running already.
   3. Ozone is running first -- and then HDFS starts up -- since they are 
independent processes it will work. That is, the port/prom , the port will be 
different so we are ok,
   4. There is no case, where both (Ozone and HDFS) are in the same process but 
Ozone starts first and then HDFS starts.  Hence this setting is safe.
   @elek , @adoroszlai Thoughts? I am going to commit this tomorrow since we 
are all in different time zones. Just making sure that my reasoning is correct.
   
   
   
   

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