walterddr commented on a change in pull request #7665: URL: https://github.com/apache/pinot/pull/7665#discussion_r740659661
########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/Command.java ########## @@ -18,12 +18,21 @@ */ package org.apache.pinot.tools; +import java.util.concurrent.Callable; + + /** * Interface class for pinot-admin commands. * * */ -public interface Command { +public interface Command extends Callable<Integer> { + + default Integer call() throws Exception { + // run execute() and returns 0 if success otherwise return -1. + return execute() ? 0 : -1; Review comment: i think any non-zero return code indicates a failure. but yes I can keep it consistent if previously it is using `1` as failure return 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org