wujiuye commented on issue #2005:
URL: 
https://github.com/apache/shardingsphere-elasticjob/issues/2005#issuecomment-958979376


   This can be reproduced:
   ```
   public class JavaSimpleJob implements SimpleJob {
   
       private final FooRepository fooRepository = 
FooRepositoryFactory.getFooRepository();
   
       @Override
       public void execute(final ShardingContext shardingContext) {
           if (shardingContext.getShardingItem() == 
System.currentTimeMillis()%shardingContext.getShardingTotalCount()) {
               throw new NullPointerException("java simple job null " + 
System.currentTimeMillis());
           }
           System.out.printf("Item: %s | Time: %s | Thread: %s | %s%n",
                   shardingContext.getShardingItem(), new 
SimpleDateFormat("HH:mm:ss").format(new Date()), 
Thread.currentThread().getId(), "SIMPLE");
           List<Foo> data = 
fooRepository.findTodoData(shardingContext.getShardingParameter(), 10);
           for (Foo each : data) {
               fooRepository.setCompleted(each.getId());
           }
       }
   }
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to