You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2019/04/15 23:23:48 UTC

[incubator-pinot] branch master updated: Default PinotAdmin Commands to not use System.exit(...). (#4110)

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 05bd234  Default PinotAdmin Commands to not use System.exit(...). (#4110)
05bd234 is described below

commit 05bd23415eeee76ea03d01ba97d55573339097c8
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Mon Apr 15 16:23:43 2019 -0700

    Default PinotAdmin Commands to not use System.exit(...). (#4110)
    
    * Default PinotAdmin Commands to not use System.exit(...).
    
    * Adding comments for pinot-admin cmd
---
 .../org/apache/pinot/tools/admin/PinotAdministrator.java     | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
index f490e2c..f56b96b 100644
--- a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
+++ b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/PinotAdministrator.java
@@ -63,6 +63,16 @@ import org.slf4j.LoggerFactory;
 /**
  * Class to implement Pinot Administrator, that provides the following commands:
  *
+ * System property: `pinot.admin.system.exit`(default to false) is used to decide if System.exit(...) will be called with exit code.
+ *
+ * Sample Usage in Commandline:
+ *  JAVA_OPTS="-Xms4G -Xmx4G -Dpinot.admin.system.exit=true" \
+ *  bin/pinot-admin.sh AddSchema \
+ *    -schemaFile /my/path/to/schema/schema.json \
+ *    -controllerHost localhost \
+ *    -controllerPort 9000 \
+ *    -exec
+ *
  */
 public class PinotAdministrator {
   private static final Logger LOGGER = LoggerFactory.getLogger(PinotAdministrator.class);
@@ -104,7 +114,7 @@ public class PinotAdministrator {
   public static void main(String[] args) {
     PinotAdministrator pinotAdministrator = new PinotAdministrator();
     pinotAdministrator.execute(args);
-    if (!System.getProperties().getProperty("pinot.admin.system.exit", "true").equalsIgnoreCase("false")) {
+    if (System.getProperties().getProperty("pinot.admin.system.exit", "false").equalsIgnoreCase("true")) {
       System.exit(pinotAdministrator.getStatus() ? 0 : 1);
     }
   }


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