You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/05/20 04:02:31 UTC
[GitHub] [druid] jihoonson commented on a change in pull request #9892: Fails creation of TaskResource if availabilityGroup is null
jihoonson commented on a change in pull request #9892:
URL: https://github.com/apache/druid/pull/9892#discussion_r427728500
##########
File path: indexing-service/src/main/java/org/apache/druid/indexing/common/task/TaskResource.java
##########
@@ -37,6 +37,7 @@ public TaskResource(
)
{
this.availabilityGroup = Preconditions.checkNotNull(availabilityGroup, "availabilityGroup");
+ Preconditions.checkArgument(requiredCapacity > 0);
Review comment:
AFAIT, we use those validation constraints for static configurations such as `RemoteTaskRunnerConfig`. `JsonConfigProvider` binds user configurations to some classes, and `JsonConfigurator` injects and validates their values. `TaskResource` is not a static configuration and we don't have such a validation framework for it as for static configurations. But I think it would be nice to have.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org