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/15 15:32:12 UTC

[GitHub] [pinot] mneedham opened a new pull request #7768: Indicate QuickStart types for invalid/missing type

mneedham opened a new pull request #7768:
URL: https://github.com/apache/pinot/pull/7768


   At the moment if you run the QuickStart with a missing type you'll get this error:
   
   ```
   docker run -p 9000:9000 apachepinot/pinot:0.9.0-SNAPSHOT-362f3e1ac-20211114-jdk11 QuickStart
   ```
   
   ```
   java.lang.NullPointerException
   	at org.apache.pinot.tools.admin.command.QuickStartCommand.execute(QuickStartCommand.java:99)
   	at org.apache.pinot.tools.Command.call(Command.java:33)
   	at org.apache.pinot.tools.Command.call(Command.java:29)
   	at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
   	at picocli.CommandLine.access$1300(CommandLine.java:145)
   	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
   	at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
   	at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
   	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
   	at picocli.CommandLine.execute(CommandLine.java:2078)
   	at org.apache.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:161)
   	at org.apache.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:192)
   ```
   
   And if you pass in an invalid type:
   
   ```
   docker run -p 9000:9000 apachepinot/pinot:0.9.0-SNAPSHOT-362f3e1ac-20211114-jdk11 QuickStart -type foo
   ```
   
   ```
   java.lang.UnsupportedOperationException: Unsupported QuickStart type: foo
   	at org.apache.pinot.tools.admin.command.QuickStartCommand.execute(QuickStartCommand.java:156)
   	at org.apache.pinot.tools.Command.call(Command.java:33)
   	at org.apache.pinot.tools.Command.call(Command.java:29)
   	at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
   	at picocli.CommandLine.access$1300(CommandLine.java:145)
   	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
   	at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
   	at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
   	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
   	at picocli.CommandLine.execute(CommandLine.java:2078)
   	at org.apache.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:161)
   	at org.apache.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:192)
   ```
   
   Neither of these messages tells the user the valid types that they can pass in. 
   
   So that's what this PR attempts to solve.
   


-- 
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] mneedham commented on a change in pull request #7768: Indicate QuickStart types for invalid/missing type

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



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/AuthQuickstart.java
##########
@@ -19,12 +19,17 @@
 package org.apache.pinot.tools;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import org.apache.pinot.core.auth.BasicAuthUtils;
 import org.apache.pinot.spi.plugin.PluginManager;
 
 
 public class AuthQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return List.of("AUTH");

Review comment:
       Ok, have updated that everywhere




-- 
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] richardstartin commented on a change in pull request #7768: Indicate QuickStart types for invalid/missing type

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



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/JsonIndexQuickStart.java
##########
@@ -36,6 +36,11 @@
 
 public class JsonIndexQuickStart extends QuickStartBase {
 
+  @Override
+  public List<String> types() {
+    return List.of("OFFLINE_JSON_INDEX", "OFFLINE-JSON-INDEX", "BATCH_JSON_INDEX", "BATCH-JSON-INDEX");

Review comment:
       And `Arrays.asList(...)` here




-- 
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] mneedham commented on a change in pull request #7768: Indicate QuickStart types for invalid/missing type

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



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/AuthQuickstart.java
##########
@@ -19,12 +19,17 @@
 package org.apache.pinot.tools;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import org.apache.pinot.core.auth.BasicAuthUtils;
 import org.apache.pinot.spi.plugin.PluginManager;
 
 
 public class AuthQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return List.of("AUTH");

Review comment:
       Ah I didn't realise that! I did start with `Arrays.asList` and `Collections.singletonList` and IntelliJ was like 'no!' :smile: 




-- 
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] codecov-commenter commented on pull request #7768: Indicate QuickStart types for invalid/missing type

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #7768:
URL: https://github.com/apache/pinot/pull/7768#issuecomment-969144202


   # [Codecov](https://codecov.io/gh/apache/pinot/pull/7768?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#7768](https://codecov.io/gh/apache/pinot/pull/7768?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (de6fdaa) into [master](https://codecov.io/gh/apache/pinot/commit/362f3e1acca6b50dcf2680848ac6dfec71d37d3b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (362f3e1) will **decrease** coverage by `6.48%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head de6fdaa differs from pull request most recent head 8ec17f9. Consider uploading reports for the commit 8ec17f9 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/pinot/pull/7768/graphs/tree.svg?width=650&height=150&src=pr&token=4ibza2ugkz&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pinot/pull/7768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #7768      +/-   ##
   ============================================
   - Coverage     71.63%   65.14%   -6.49%     
   + Complexity     4079     4076       -3     
   ============================================
     Files          1578     1533      -45     
     Lines         80629    78764    -1865     
     Branches      11982    11780     -202     
   ============================================
   - Hits          57756    51314    -6442     
   - Misses        18981    23796    +4815     
   + Partials       3892     3654     -238     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | integration1 | `?` | |
   | integration2 | `?` | |
   | unittests1 | `68.59% <ø> (-0.02%)` | :arrow_down: |
   | unittests2 | `14.58% <ø> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pinot/pull/7768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/pinot/common/metrics/MinionMeter.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9NaW5pb25NZXRlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...g/apache/pinot/common/metrics/ControllerMeter.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9Db250cm9sbGVyTWV0ZXIuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../apache/pinot/common/metrics/BrokerQueryPhase.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9Ccm9rZXJRdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../apache/pinot/common/metrics/MinionQueryPhase.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9NaW5pb25RdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...he/pinot/common/messages/SegmentReloadMessage.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWVzc2FnZXMvU2VnbWVudFJlbG9hZE1lc3NhZ2UuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...pinot/core/data/manager/realtime/TimerService.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvVGltZXJTZXJ2aWNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...pinot/minion/exception/TaskCancelledException.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtbWluaW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9taW5pb24vZXhjZXB0aW9uL1Rhc2tDYW5jZWxsZWRFeGNlcHRpb24uamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...not/common/exception/HttpErrorStatusException.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vZXhjZXB0aW9uL0h0dHBFcnJvclN0YXR1c0V4Y2VwdGlvbi5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...t/core/startree/plan/StarTreeDocIdSetPlanNode.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zdGFydHJlZS9wbGFuL1N0YXJUcmVlRG9jSWRTZXRQbGFuTm9kZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ot/common/restlet/resources/TableMetadataInfo.java](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vcmVzdGxldC9yZXNvdXJjZXMvVGFibGVNZXRhZGF0YUluZm8uamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [358 more](https://codecov.io/gh/apache/pinot/pull/7768/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/pinot/pull/7768?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/pinot/pull/7768?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [362f3e1...8ec17f9](https://codecov.io/gh/apache/pinot/pull/7768?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] richardstartin commented on a change in pull request #7768: Indicate QuickStart types for invalid/missing type

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



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/AuthQuickstart.java
##########
@@ -19,12 +19,17 @@
 package org.apache.pinot.tools;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import org.apache.pinot.core.auth.BasicAuthUtils;
 import org.apache.pinot.spi.plugin.PluginManager;
 
 
 public class AuthQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return List.of("AUTH");

Review comment:
       We need to be JDK8 source compatible - `Collections.singletonList("AUTH")` would do the trick.




-- 
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 merged pull request #7768: Indicate QuickStart types for invalid/missing type

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang merged pull request #7768:
URL: https://github.com/apache/pinot/pull/7768


   


-- 
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] richardstartin commented on a change in pull request #7768: Indicate QuickStart types for invalid/missing type

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



##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/AuthQuickstart.java
##########
@@ -19,12 +19,17 @@
 package org.apache.pinot.tools;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import org.apache.pinot.core.auth.BasicAuthUtils;
 import org.apache.pinot.spi.plugin.PluginManager;
 
 
 public class AuthQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return List.of("AUTH");

Review comment:
       There are lots of reasons to drop JDK8 source compatibility, including this one, unfortunately it's not on the horizon yet.




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