You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/08 19:59:27 UTC

[GitHub] [pinot] xiangfu0 opened a new pull request #7722: Skip pinot.admin.system.exit check for quickstart

xiangfu0 opened a new pull request #7722:
URL: https://github.com/apache/pinot/pull/7722


   ## Description
   QuickStart commands starting using `bin/pinot-admin.sh QuickStart -type XXX` will exit once the table is bootstrapped.
   
   This is extremely annoying when running pinot from docker.
   
   ## Upgrade Notes
   Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
   * [ ] Yes (Please label as **<code>backward-incompat</code>**, and complete the section below on Release Notes)
   
   Does this PR fix a zero-downtime upgrade introduced earlier?
   * [ ] Yes (Please label this as **<code>backward-incompat</code>**, and complete the section below on Release Notes)
   
   Does this PR otherwise need attention when creating release notes? Things to consider:
   - New configuration options
   - Deprecation of configurations
   - Signature changes to public methods/interfaces
   - New plugins added or old plugins removed
   * [ ] Yes (Please label this PR as **<code>release-notes</code>** and complete the section on Release Notes)
   ## Release Notes
   <!-- If you have tagged this as either backward-incompat or release-notes,
   you MUST add text here that you would like to see appear in release notes of the
   next release. -->
   
   <!-- If you have a series of commits adding or enabling a feature, then
   add this section only in final commit that marks the feature completed.
   Refer to earlier release notes to see examples of text.
   -->
   ## Documentation
   <!-- If you have introduced a new feature or configuration, please add it to the documentation as well.
   See https://docs.pinot.apache.org/developers/developers-and-contributors/update-document
   -->
   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] xiangfu0 commented on a change in pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
xiangfu0 commented on a change in pull request #7722:
URL: https://github.com/apache/pinot/pull/7722#discussion_r745086080



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
##########
@@ -192,7 +192,11 @@ public static void main(String[] args) {
     PluginManager.get().init();
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
     pinotAdministrator.execute(args);
-    if (System.getProperties().getProperty("pinot.admin.system.exit", "false").equalsIgnoreCase("true")) {
+    // Ignore `pinot.admin.system.exit` property for Pinot quickstarts.
+    if ((args.length > 0) && ("quickstart".equalsIgnoreCase(args[0]))) {
+      System.clearProperty("pinot.admin.system.exit");
+    }
+    if (Boolean.parseBoolean(System.getProperties().getProperty("pinot.admin.system.exit"))) {
       // If status is true, cmd was successfully, so return 0 from process.
       System.exit(pinotAdministrator._status);

Review comment:
       it require a check for property `pinot.admin.system.exit`.
   Also commands like `StartController/Broker/Server/Minion` don't need this as well.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on a change in pull request #7722:
URL: https://github.com/apache/pinot/pull/7722#discussion_r745057862



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
##########
@@ -192,7 +192,11 @@ public static void main(String[] args) {
     PluginManager.get().init();
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
     pinotAdministrator.execute(args);
-    if (System.getProperties().getProperty("pinot.admin.system.exit", "false").equalsIgnoreCase("true")) {
+    // Ignore `pinot.admin.system.exit` property for Pinot quickstarts.
+    if ((args.length > 0) && ("quickstart".equalsIgnoreCase(args[0]))) {
+      System.clearProperty("pinot.admin.system.exit");

Review comment:
       Is there side-effect of clearing a property? If so, might better to just return instead of clearing 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@pinot.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on a change in pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
walterddr commented on a change in pull request #7722:
URL: https://github.com/apache/pinot/pull/7722#discussion_r745053508



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
##########
@@ -192,7 +192,11 @@ public static void main(String[] args) {
     PluginManager.get().init();
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
     pinotAdministrator.execute(args);
-    if (System.getProperties().getProperty("pinot.admin.system.exit", "false").equalsIgnoreCase("true")) {
+    // Ignore `pinot.admin.system.exit` property for Pinot quickstarts.
+    if ((args.length > 0) && ("quickstart".equalsIgnoreCase(args[0]))) {
+      System.clearProperty("pinot.admin.system.exit");
+    }
+    if (Boolean.parseBoolean(System.getProperties().getProperty("pinot.admin.system.exit"))) {
       // If status is true, cmd was successfully, so return 0 from process.
       System.exit(pinotAdministrator._status);

Review comment:
       why not add it here:
   ```suggestion
         if (args.length == 0 || !"quickstart".equalsIgnoreCase(args[0])) {
           System.exit(pinotAdministrator._status);
         }
   ```
   




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] kkrugler commented on a change in pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
kkrugler commented on a change in pull request #7722:
URL: https://github.com/apache/pinot/pull/7722#discussion_r748782799



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
##########
@@ -192,7 +192,11 @@ public static void main(String[] args) {
     PluginManager.get().init();
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
     pinotAdministrator.execute(args);
-    if (System.getProperties().getProperty("pinot.admin.system.exit", "false").equalsIgnoreCase("true")) {
+    // Ignore `pinot.admin.system.exit` property for Pinot quickstarts.
+    if ((args.length > 0) && ("quickstart".equalsIgnoreCase(args[0]))) {

Review comment:
       I know I'm late to the party, but why bury a somewhat obscure raw string comparison in this code (and elsewhere), versus having the quickstart code ensure `pinot.admin.system.exit` is set to `false`?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on a change in pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
walterddr commented on a change in pull request #7722:
URL: https://github.com/apache/pinot/pull/7722#discussion_r745088200



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
##########
@@ -192,7 +192,11 @@ public static void main(String[] args) {
     PluginManager.get().init();
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
     pinotAdministrator.execute(args);
-    if (System.getProperties().getProperty("pinot.admin.system.exit", "false").equalsIgnoreCase("true")) {
+    // Ignore `pinot.admin.system.exit` property for Pinot quickstarts.
+    if ((args.length > 0) && ("quickstart".equalsIgnoreCase(args[0]))) {
+      System.clearProperty("pinot.admin.system.exit");
+    }
+    if (Boolean.parseBoolean(System.getProperties().getProperty("pinot.admin.system.exit"))) {
       // If status is true, cmd was successfully, so return 0 from process.
       System.exit(pinotAdministrator._status);

Review comment:
       yeah but if you don't set _status it will always be zero so it exits with success code. 




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] walterddr commented on a change in pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
walterddr commented on a change in pull request #7722:
URL: https://github.com/apache/pinot/pull/7722#discussion_r745054684



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
##########
@@ -192,7 +192,11 @@ public static void main(String[] args) {
     PluginManager.get().init();
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
     pinotAdministrator.execute(args);
-    if (System.getProperties().getProperty("pinot.admin.system.exit", "false").equalsIgnoreCase("true")) {
+    // Ignore `pinot.admin.system.exit` property for Pinot quickstarts.
+    if ((args.length > 0) && ("quickstart".equalsIgnoreCase(args[0]))) {
+      System.clearProperty("pinot.admin.system.exit");
+    }
+    if (Boolean.parseBoolean(System.getProperties().getProperty("pinot.admin.system.exit"))) {
       // If status is true, cmd was successfully, so return 0 from process.
       System.exit(pinotAdministrator._status);

Review comment:
       or we can add a _status setter in https://github.com/apache/pinot/pull/7722/files#diff-d9ba9e4c3102ed68cca30a3c3d7ab7c34e13a342ae9fc59685006b22f3c6322eL163
   ```
         } else {
           int status = commandLine.execute(args);
           if (!parseResult.getSubcommand.equalsIgnoreCase("quickstart")) {
             _status = status;
           }
         }
   ```




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] xiangfu0 commented on pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
xiangfu0 commented on pull request #7722:
URL: https://github.com/apache/pinot/pull/7722#issuecomment-963576472


   cc @kkrugler 


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] xiangfu0 merged pull request #7722: Skip pinot.admin.system.exit check for quickstart

Posted by GitBox <gi...@apache.org>.
xiangfu0 merged pull request #7722:
URL: https://github.com/apache/pinot/pull/7722


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org