You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/16 15:45:17 UTC

[GitHub] [pulsar] HQebupt opened a new pull request, #16096: [cleanup][broker]remove unused field variable in in the constructor of LeastLongTermMessageRate

HQebupt opened a new pull request, #16096:
URL: https://github.com/apache/pulsar/pull/16096

   ### Motivation
   Code cleanup, remove the unused field variable:`ServiceConfiguration conf` in  in the constructor of LeastLongTermMessageRate
   
   
   ### Modifications
   Delete the field variable:`ServiceConfiguration conf`.
   
   ### Verifying this change
   
   - [x]  Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   If `yes` was chosen, please highlight the changes
   
   - Dependencies (does it add or upgrade a dependency): (no)
   - The public API: (no)
   - The schema: (no)
   - The default values of configurations: (no)
   - The wire protocol: (no)
   - The rest endpoints: (no)
   - The admin cli options: (no)
   - Anything that affects deployment: (no)
   
   ### Documentation
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   - [x] `doc-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@pulsar.apache.org

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


[GitHub] [pulsar] HQebupt commented on a diff in pull request #16096: [cleanup][broker]remove unused field variable in in the constructor of LeastLongTermMessageRate

Posted by GitBox <gi...@apache.org>.
HQebupt commented on code in PR #16096:
URL: https://github.com/apache/pulsar/pull/16096#discussion_r901375543


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerStrategy.java:
##########
@@ -49,17 +49,15 @@ Optional<String> selectBroker(Set<String> candidates, BundleData bundleToAssign,
     /**
      * Create a placement strategy using the configuration.
      *
-     * @param conf
-     *            ServiceConfiguration to use.
      * @return A placement strategy from the given configurations.
      */
-    static ModularLoadManagerStrategy create(final ServiceConfiguration conf) {
+    static ModularLoadManagerStrategy create() {

Review Comment:
   The `ServiceConfiguration  conf` is used in the method `selectBroker` by `ModularLoadManagerStrategy`
   https://github.com/apache/pulsar/blob/a812f29bab93a5e841a9b3c3190fca343fab6e71/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerStrategy.java#L31-L47



-- 
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@pulsar.apache.org

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


[GitHub] [pulsar] Jason918 commented on a diff in pull request #16096: [cleanup][broker]remove unused field variable in in the constructor of LeastLongTermMessageRate

Posted by GitBox <gi...@apache.org>.
Jason918 commented on code in PR #16096:
URL: https://github.com/apache/pulsar/pull/16096#discussion_r901224090


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/ModularLoadManagerStrategy.java:
##########
@@ -49,17 +49,15 @@ Optional<String> selectBroker(Set<String> candidates, BundleData bundleToAssign,
     /**
      * Create a placement strategy using the configuration.
      *
-     * @param conf
-     *            ServiceConfiguration to use.
      * @return A placement strategy from the given configurations.
      */
-    static ModularLoadManagerStrategy create(final ServiceConfiguration conf) {
+    static ModularLoadManagerStrategy create() {

Review Comment:
   IMO, better to keep this in case we create some new `ModularLoadManagerStrategy` and needs configuration.



-- 
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@pulsar.apache.org

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


[GitHub] [pulsar] Jason918 merged pull request #16096: [cleanup][broker]remove unused field variable in in the constructor of LeastLongTermMessageRate

Posted by GitBox <gi...@apache.org>.
Jason918 merged PR #16096:
URL: https://github.com/apache/pulsar/pull/16096


-- 
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@pulsar.apache.org

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