You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/24 13:42:20 UTC

[GitHub] [shardingsphere-elasticjob] vran-dev opened a new issue #1496: Confusing exception information when construct `JobScheduler`

vran-dev opened a new issue #1496:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1496


   
   
   If  param  `elasticJob` is null, the following `JobScheduler` contructor will throw **JobConfigurationException:  Can not find executor for elastic job type `null`**
   
   ```java
   // at line 78
   public JobScheduler(final CoordinatorRegistryCenter regCenter,
                       final ElasticJob elasticJob,
                       final JobConfiguration jobConfig,
                       final TracingConfiguration<?> tracingConfig,
                       final ElasticJobListener... elasticJobListeners)
   ```
   
   this constructor don't care param `String elasticJobType`, so the error message  make user confusing. 
   
   It's caused by the following code segment
   
   ```java
   // at line 78
   public JobScheduler(...) {
       // in this constructor,  elasticJobType is always null
       elasticJobType = null; // at line 82
       // elasticJob is null, will call `ElasticJobExecutor` constructor, then throw JobConfigurationException
       jobExecutor = null == elasticJob ? new ElasticJobExecutor(elasticJobType, jobConfig, jobFacade) : new ElasticJobExecutor(elasticJob, jobConfig, jobFacade); // at line 87
   }
   ```
   
   so, i think
   
   - should do Pre-check for param `elasticJob`
   - give more clearly error message
   
   could i improve 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.

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



[GitHub] [shardingsphere-elasticjob] terrymanu closed issue #1496: Confusing exception information when construct `JobScheduler`

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #1496:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1496


   


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



[GitHub] [shardingsphere-elasticjob] vran-dev commented on issue #1496: Confusing exception information when construct `JobScheduler`

Posted by GitBox <gi...@apache.org>.
vran-dev commented on issue #1496:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1496#issuecomment-698693111


   > Yes. but this has been updated by #1476 . please check.
   > Btw, welcome to do any improvement.
   
   I checked the latest changes, the problem still exists.
   
   please assign to me, i will try to improve 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.

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



[GitHub] [shardingsphere-elasticjob] Technoboy- commented on issue #1496: Confusing exception information when construct `JobScheduler`

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #1496:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1496#issuecomment-698679276


   Yes. but this has been updated by #1476 . please check.
   Btw, welcome to do any improvement. 


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



[GitHub] [shardingsphere-elasticjob] terrymanu commented on issue #1496: Confusing exception information when construct `JobScheduler`

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #1496:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1496#issuecomment-699005009


   Invalid, I put the reason to the pr


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



[GitHub] [shardingsphere-elasticjob] vran-dev commented on issue #1496: Confusing exception information when construct `JobScheduler`

Posted by GitBox <gi...@apache.org>.
vran-dev commented on issue #1496:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1496#issuecomment-698693111


   > Yes. but this has been updated by #1476 . please check.
   > Btw, welcome to do any improvement.
   
   I checked the latest changes, the problem still exists.
   
   please assign to me, i will try to improve 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.

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



[GitHub] [shardingsphere-elasticjob] Technoboy- commented on issue #1496: Confusing exception information when construct `JobScheduler`

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #1496:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1496#issuecomment-698679276


   Yes. but this has been updated by #1476 . please check.
   Btw, welcome to do any improvement. 


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