You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/01/03 13:33:40 UTC

[GitHub] [hudi] t0il3ts0ap opened a new pull request #4497: [MINOR] Create pushgateway client based on port

t0il3ts0ap opened a new pull request #4497:
URL: https://github.com/apache/hudi/pull/4497


   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   *https://github.com/apache/hudi/issues/4496*
   Fix above issue
   
   ## Brief change log
   
   - *Consider port while creating pushgateway client*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage. 
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] nsivabalan merged pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
nsivabalan merged pull request #4497:
URL: https://github.com/apache/hudi/pull/4497


   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot removed a comment on pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1009351018


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   * 7e57a13805648810521c82a1e4124be156e9a10e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #4497: [MINOR] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1004098293


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #4497: [MINOR] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1004141119


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1009351018


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   * 7e57a13805648810521c82a1e4124be156e9a10e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot removed a comment on pull request #4497: [MINOR] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1004098293


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] t0il3ts0ap commented on a change in pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
t0il3ts0ap commented on a change in pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#discussion_r785310587



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/prometheus/PushGatewayReporter.java
##########
@@ -51,17 +53,30 @@ protected PushGatewayReporter(MetricRegistry registry,
                                 TimeUnit rateUnit,
                                 TimeUnit durationUnit,
                                 String jobName,
-                                String address,
+                                String serverHost,
+                                int serverPort,
                                 boolean deleteShutdown) {
     super(registry, "hudi-push-gateway-reporter", filter, rateUnit, durationUnit);
     this.jobName = jobName;
     this.deleteShutdown = deleteShutdown;
     collectorRegistry = new CollectorRegistry();
     metricExports = new DropwizardExports(registry);
-    pushGateway = new PushGateway(address);
+    pushGateway = createPushGatewayClient(serverHost, serverPort);
     metricExports.register(collectorRegistry);
   }
 
+  private PushGateway createPushGatewayClient(String serverHost, int serverPort) {
+    if (serverPort == 443) {
+      try {
+        return new PushGateway(new URL("https://" + serverHost));

Review comment:
       @nsivabalan Srry, couldnt reply in time. Yes this is tested, its not needed. Shouldn't be an issue, even if added.




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot removed a comment on pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1004141119


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] nsivabalan commented on pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1013687816


   @t0il3ts0ap : sorry do you know if suffixing the port would work or fail? I did not get a chance to test it out, but suffixed the port and merged it in. 
   can you please let me know if we need to fix it. 


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1009407398


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5066",
       "triggerID" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7e57a13805648810521c82a1e4124be156e9a10e Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5066) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1009353923


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5066",
       "triggerID" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   * 7e57a13805648810521c82a1e4124be156e9a10e Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5066) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot removed a comment on pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1009353923


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5066",
       "triggerID" : "7e57a13805648810521c82a1e4124be156e9a10e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   * 7e57a13805648810521c82a1e4124be156e9a10e Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5066) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] t0il3ts0ap commented on a change in pull request #4497: [HUDI-3148] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
t0il3ts0ap commented on a change in pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#discussion_r785310587



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/prometheus/PushGatewayReporter.java
##########
@@ -51,17 +53,30 @@ protected PushGatewayReporter(MetricRegistry registry,
                                 TimeUnit rateUnit,
                                 TimeUnit durationUnit,
                                 String jobName,
-                                String address,
+                                String serverHost,
+                                int serverPort,
                                 boolean deleteShutdown) {
     super(registry, "hudi-push-gateway-reporter", filter, rateUnit, durationUnit);
     this.jobName = jobName;
     this.deleteShutdown = deleteShutdown;
     collectorRegistry = new CollectorRegistry();
     metricExports = new DropwizardExports(registry);
-    pushGateway = new PushGateway(address);
+    pushGateway = createPushGatewayClient(serverHost, serverPort);
     metricExports.register(collectorRegistry);
   }
 
+  private PushGateway createPushGatewayClient(String serverHost, int serverPort) {
+    if (serverPort == 443) {
+      try {
+        return new PushGateway(new URL("https://" + serverHost));

Review comment:
       @nsivabalan Srry, couldnt reply in time. Yes this is tested, its not needed.




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #4497: [MINOR] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1004100037


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot removed a comment on pull request #4497: [MINOR] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#issuecomment-1004100037


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871",
       "triggerID" : "f3d6924b2c8f912bc95db932b3088487b76b0785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f3d6924b2c8f912bc95db932b3088487b76b0785 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4871) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] nsivabalan commented on a change in pull request #4497: [HUDI-3147] Create pushgateway client based on port

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #4497:
URL: https://github.com/apache/hudi/pull/4497#discussion_r779678339



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metrics/prometheus/PushGatewayReporter.java
##########
@@ -51,17 +53,30 @@ protected PushGatewayReporter(MetricRegistry registry,
                                 TimeUnit rateUnit,
                                 TimeUnit durationUnit,
                                 String jobName,
-                                String address,
+                                String serverHost,
+                                int serverPort,
                                 boolean deleteShutdown) {
     super(registry, "hudi-push-gateway-reporter", filter, rateUnit, durationUnit);
     this.jobName = jobName;
     this.deleteShutdown = deleteShutdown;
     collectorRegistry = new CollectorRegistry();
     metricExports = new DropwizardExports(registry);
-    pushGateway = new PushGateway(address);
+    pushGateway = createPushGatewayClient(serverHost, serverPort);
     metricExports.register(collectorRegistry);
   }
 
+  private PushGateway createPushGatewayClient(String serverHost, int serverPort) {
+    if (serverPort == 443) {
+      try {
+        return new PushGateway(new URL("https://" + serverHost));

Review comment:
       @t0il3ts0ap : Did you test this patch? 
   don't we need 
   ```
   new URL("https://" + serverHost + ":" + serverPort));
   ```




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org