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 2021/12/07 09:39:20 UTC

[GitHub] [pulsar] nicoloboschi opened a new pull request #13169: [admin-client] 'rebalance' command for functions worker

nicoloboschi opened a new pull request #13169:
URL: https://github.com/apache/pulsar/pull/13169


   ### Motivation
   
   The `rebalance` feature is currently exposed only to the REST api. 
   It can be useful to have this command in the Admin CLI because the rebalance work is performed only by leader of Functions workers so the client needs to eventually follow redirects and the user may not be aware.
   The Admin CLI follow the redirect under the hood  
   
   ### Modifications
   
   * Added a new command `bin/pulsar-admin functions-worker rebalance` (no parameters needed)
   * Added a unit test to verify the REST api is triggered
   
   Notes:
   * the user doesn't need to specify the functions worker leader
   * it works with and without enabling authentication
   
   ### Does this pull request potentially affect one of the following parts:
   
    - The admin cli options: (yes) -> new command
   
   ### Documentation
   
   - [x] `no-need-doc`
    
   
   


-- 
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] eolivelli commented on a change in pull request #13169: [admin-client] 'rebalance' command for functions worker

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #13169:
URL: https://github.com/apache/pulsar/pull/13169#discussion_r763834194



##########
File path: pulsar-client-tools/src/test/java/org/apache/pulsar/admin/cli/TestCmdFunctionWorker.java
##########
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pulsar.admin.cli;
+
+import org.apache.pulsar.client.admin.PulsarAdmin;
+import org.apache.pulsar.client.admin.Worker;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.mockito.Mockito.*;

Review comment:
       please avoid star imports




-- 
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] eolivelli merged pull request #13169: [admin-client] 'rebalance' command for functions worker

Posted by GitBox <gi...@apache.org>.
eolivelli merged pull request #13169:
URL: https://github.com/apache/pulsar/pull/13169


   


-- 
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] nicoloboschi commented on pull request #13169: [admin-client] 'rebalance' command for functions worker

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on pull request #13169:
URL: https://github.com/apache/pulsar/pull/13169#issuecomment-989567550


   @lhotari @michaeljmarshall @codelipenghui PTAL


-- 
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] nicoloboschi commented on pull request #13169: [admin-client] 'rebalance' command for functions worker

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on pull request #13169:
URL: https://github.com/apache/pulsar/pull/13169#issuecomment-988073294


   /pulsarbot run-failure-checks
   
   


-- 
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] nicoloboschi commented on pull request #13169: [admin-client] 'rebalance' command for functions worker

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on pull request #13169:
URL: https://github.com/apache/pulsar/pull/13169#issuecomment-988212729


   /pulsarbot run-failure-checks


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