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/10/09 02:20:18 UTC

[GitHub] [shardingsphere-elasticjob] wwj-go opened a new pull request #1548: Redesign SPI factory to make them into one class (#1537)

wwj-go opened a new pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548


   Fixes #1537.
   
   Changes proposed in this pull request:
   
   Redesign SPI factory to make logic about their TypedSPI into ElasticJobServiceLoader. The SPI factory class are:
   - `JobShardingStrategyFactory`
   - `JobExecutorServiceHandlerFactory`
   - `JobErrorHandlerFactory`
   - `ElasticJobListenerFactory`
   
   The situation of `JobItemExecutorFactory `is a bit complicated and will be completed in subsequent work.


----------------------------------------------------------------
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] TeslaCN commented on a change in pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on a change in pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#discussion_r502144791



##########
File path: elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoader.java
##########
@@ -76,4 +81,58 @@ private static Object newServiceInstance(final Class<?> clazz) {
             throw new ServiceLoaderInstantiationException(clazz, ex.getCause());
         }
     }
+
+    /**
+     * Register typeSPI service.
+     *
+     * @param typedService specific service type
+     * @param <T> type of service
+     */
+    public static <T> void registerTypedService(final Class<T> typedService) {
+        if (!TypedSPI.class.isAssignableFrom(typedService)) {
+            throw new IllegalArgumentException("Cannot register @" + typedService.getName() + "as a typed service, because its not a subClass of @" + typedService);
+        }
+        if (TYPED_SERVICES.containsKey(typedService)) {
+            return;
+        }
+        ServiceLoader.load(typedService).forEach(each -> registerTypedServiceClass(typedService, (TypedSPI) each));
+    }
+
+    private static <T> void registerTypedServiceClass(final Class<T> typedService, final TypedSPI instance) {
+        TYPED_SERVICES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance);
+        TYPED_SERVICE_CLASSES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance.getClass());
+    }
+
+    /**
+     * Get cached instance.
+     *
+     * @param typedService service type
+     * @param type         specific service type
+     * @param <T>          specific type of service
+     * @return cached service instance
+     */
+    public static <T extends TypedSPI> T getCachedInstance(final Class<T> typedService, final String type) {
+        T instance = TYPED_SERVICES.containsKey(typedService) ? (T) TYPED_SERVICES.get(typedService).get(type) : null;
+        if (instance == null) {

Review comment:
       Have constants on the left and variable on the right in = and equals conditional expressions; Have variable on the left and constants on the right in greater than and less than conditional expressions.
   Ref https://shardingsphere.apache.org/community/en/contribute/code-conduct/

##########
File path: elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoader.java
##########
@@ -76,4 +81,58 @@ private static Object newServiceInstance(final Class<?> clazz) {
             throw new ServiceLoaderInstantiationException(clazz, ex.getCause());
         }
     }
+
+    /**
+     * Register typeSPI service.
+     *
+     * @param typedService specific service type
+     * @param <T> type of service
+     */
+    public static <T> void registerTypedService(final Class<T> typedService) {
+        if (!TypedSPI.class.isAssignableFrom(typedService)) {
+            throw new IllegalArgumentException("Cannot register @" + typedService.getName() + "as a typed service, because its not a subClass of @" + typedService);
+        }
+        if (TYPED_SERVICES.containsKey(typedService)) {
+            return;
+        }
+        ServiceLoader.load(typedService).forEach(each -> registerTypedServiceClass(typedService, (TypedSPI) each));
+    }
+
+    private static <T> void registerTypedServiceClass(final Class<T> typedService, final TypedSPI instance) {
+        TYPED_SERVICES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance);
+        TYPED_SERVICE_CLASSES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance.getClass());
+    }
+
+    /**
+     * Get cached instance.
+     *
+     * @param typedService service type
+     * @param type         specific service type
+     * @param <T>          specific type of service
+     * @return cached service instance
+     */
+    public static <T extends TypedSPI> T getCachedInstance(final Class<T> typedService, final String type) {
+        T instance = TYPED_SERVICES.containsKey(typedService) ? (T) TYPED_SERVICES.get(typedService).get(type) : null;
+        if (instance == null) {
+            throw new JobConfigurationException("Cannot find a cached typed service instance by the interface: @" + typedService.getName() + "and type: " + type);
+        }
+        return instance;
+    }
+
+    /**
+     * New typed instance.
+     *
+     * @param typedService service type
+     * @param type         specific service type
+     * @param <T>          specific type of service
+     * @return specific typed service instance
+     */
+    public static <T extends TypedSPI> T newTypedServiceInstance(final Class<T> typedService, final String type) {
+        Class<?> instanceClass = TYPED_SERVICE_CLASSES.containsKey(typedService) ? TYPED_SERVICE_CLASSES.get(typedService).get(type) : null;
+        if (instanceClass == null) {

Review comment:
       Have constants on the left and variable on the right in = and equals conditional expressions; Have variable on the left and constants on the right in greater than and less than conditional expressions.
   Ref https://shardingsphere.apache.org/community/en/contribute/code-conduct/




----------------------------------------------------------------
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] TeslaCN commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705930833


   @wwj-go Thanks for you contribution. You can push commits instead of opening another 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] codecov-io edited a comment on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705930074


   # [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=h1) Report
   > Merging [#1548](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/11532014e40561ea4bb46e93a2592e5b072a6f8c?el=desc) will **decrease** coverage by `0.31%`.
   > The diff coverage is `62.06%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z)](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1548      +/-   ##
   ============================================
   - Coverage     85.30%   84.99%   -0.32%     
   + Complexity      102      101       -1     
   ============================================
     Files           247      247              
     Lines          5676     5685       +9     
     Branches        890      892       +2     
   ============================================
   - Hits           4842     4832      -10     
   - Misses          524      538      +14     
   - Partials        310      315       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...cjob/infra/listener/ElasticJobListenerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9saXN0ZW5lci9FbGFzdGljSm9iTGlzdGVuZXJGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [.../elasticjob/infra/spi/ElasticJobServiceLoader.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9zcGkvRWxhc3RpY0pvYlNlcnZpY2VMb2FkZXIuamF2YQ==) | `34.37% <52.63%> (+34.37%)` | `0.00 <0.00> (ø)` | |
   | [...asticjob/error/handler/JobErrorHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1lcnJvci1oYW5kbGVyL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci10eXBlL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci1nZW5lcmFsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2Vycm9yL2hhbmRsZXIvSm9iRXJyb3JIYW5kbGVyRmFjdG9yeS5qYXZh) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...a/handler/sharding/JobShardingStrategyFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3NoYXJkaW5nL0pvYlNoYXJkaW5nU3RyYXRlZ3lGYWN0b3J5LmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...r/threadpool/JobExecutorServiceHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3RocmVhZHBvb2wvSm9iRXhlY3V0b3JTZXJ2aWNlSGFuZGxlckZhY3RvcnkuamF2YQ==) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...ener/AbstractDistributeOnceElasticJobListener.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvYXBpL2xpc3RlbmVyL0Fic3RyYWN0RGlzdHJpYnV0ZU9uY2VFbGFzdGljSm9iTGlzdGVuZXIuamF2YQ==) | `74.07% <0.00%> (-7.41%)` | `0.00% <0.00%> (ø%)` | |
   | [...e/shardingsphere/elasticjob/infra/env/IpUtils.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9lbnYvSXBVdGlscy5qYXZh) | `60.00% <0.00%> (-4.62%)` | `0.00% <0.00%> (ø%)` | |
   | [...asticjob/lite/internal/storage/JobNodeStorage.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc3RvcmFnZS9Kb2JOb2RlU3RvcmFnZS5qYXZh) | `87.50% <0.00%> (-3.58%)` | `0.00% <0.00%> (ø%)` | |
   | [...ticjob/lite/internal/snapshot/SnapshotService.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc25hcHNob3QvU25hcHNob3RTZXJ2aWNlLmphdmE=) | `80.95% <0.00%> (-1.59%)` | `1.00% <0.00%> (ø%)` | |
   | [...sticjob/reg/zookeeper/ZookeeperRegistryCenter.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLXJlZ2lzdHJ5LWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9yZWcvem9va2VlcGVyL1pvb2tlZXBlclJlZ2lzdHJ5Q2VudGVyLmphdmE=) | `72.44% <0.00%> (-0.79%)` | `32.00% <0.00%> (-1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=footer). Last update [1153201...4de29ba](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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] codecov-io edited a comment on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705930074


   # [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=h1) Report
   > Merging [#1548](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/11532014e40561ea4bb46e93a2592e5b072a6f8c?el=desc) will **decrease** coverage by `0.15%`.
   > The diff coverage is `62.06%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z)](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1548      +/-   ##
   ============================================
   - Coverage     85.30%   85.15%   -0.16%     
   + Complexity      102      101       -1     
   ============================================
     Files           247      247              
     Lines          5676     5685       +9     
     Branches        890      892       +2     
   ============================================
   - Hits           4842     4841       -1     
   - Misses          524      530       +6     
   - Partials        310      314       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...cjob/infra/listener/ElasticJobListenerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9saXN0ZW5lci9FbGFzdGljSm9iTGlzdGVuZXJGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [.../elasticjob/infra/spi/ElasticJobServiceLoader.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9zcGkvRWxhc3RpY0pvYlNlcnZpY2VMb2FkZXIuamF2YQ==) | `34.37% <52.63%> (+34.37%)` | `0.00 <0.00> (ø)` | |
   | [...asticjob/error/handler/JobErrorHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1lcnJvci1oYW5kbGVyL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci10eXBlL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci1nZW5lcmFsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2Vycm9yL2hhbmRsZXIvSm9iRXJyb3JIYW5kbGVyRmFjdG9yeS5qYXZh) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...a/handler/sharding/JobShardingStrategyFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3NoYXJkaW5nL0pvYlNoYXJkaW5nU3RyYXRlZ3lGYWN0b3J5LmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...r/threadpool/JobExecutorServiceHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3RocmVhZHBvb2wvSm9iRXhlY3V0b3JTZXJ2aWNlSGFuZGxlckZhY3RvcnkuamF2YQ==) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...ticjob/lite/internal/snapshot/SnapshotService.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc25hcHNob3QvU25hcHNob3RTZXJ2aWNlLmphdmE=) | `80.95% <0.00%> (-1.59%)` | `1.00% <0.00%> (ø%)` | |
   | [...sticjob/reg/zookeeper/ZookeeperRegistryCenter.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLXJlZ2lzdHJ5LWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9yZWcvem9va2VlcGVyL1pvb2tlZXBlclJlZ2lzdHJ5Q2VudGVyLmphdmE=) | `72.44% <0.00%> (-0.79%)` | `32.00% <0.00%> (-1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=footer). Last update [1153201...3f393fc](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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] codecov-io edited a comment on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705930074






----------------------------------------------------------------
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] wwj-go commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
wwj-go commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705933864


   @TeslaCN Thanks for your suggestions. 
   As a novice in the community, your positive responses and sincere suggestions made me feel very warm and made me full of confidence in the community.
    I have push a commit  fixed the problem you mentioned above.
   
   > @wwj-go Thanks for you contribution. You can push commits instead of opening another 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] codecov-io commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705930074


   # [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=h1) Report
   > Merging [#1548](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/11532014e40561ea4bb46e93a2592e5b072a6f8c?el=desc) will **decrease** coverage by `0.20%`.
   > The diff coverage is `62.06%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z)](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1548      +/-   ##
   ============================================
   - Coverage     85.30%   85.10%   -0.21%     
   + Complexity      102      101       -1     
   ============================================
     Files           247      247              
     Lines          5676     5685       +9     
     Branches        890      892       +2     
   ============================================
   - Hits           4842     4838       -4     
   - Misses          524      531       +7     
   - Partials        310      316       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...cjob/infra/listener/ElasticJobListenerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9saXN0ZW5lci9FbGFzdGljSm9iTGlzdGVuZXJGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [.../elasticjob/infra/spi/ElasticJobServiceLoader.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9zcGkvRWxhc3RpY0pvYlNlcnZpY2VMb2FkZXIuamF2YQ==) | `34.37% <52.63%> (+34.37%)` | `0.00 <0.00> (ø)` | |
   | [...asticjob/error/handler/JobErrorHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1lcnJvci1oYW5kbGVyL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci10eXBlL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci1nZW5lcmFsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2Vycm9yL2hhbmRsZXIvSm9iRXJyb3JIYW5kbGVyRmFjdG9yeS5qYXZh) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...a/handler/sharding/JobShardingStrategyFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3NoYXJkaW5nL0pvYlNoYXJkaW5nU3RyYXRlZ3lGYWN0b3J5LmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...r/threadpool/JobExecutorServiceHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3RocmVhZHBvb2wvSm9iRXhlY3V0b3JTZXJ2aWNlSGFuZGxlckZhY3RvcnkuamF2YQ==) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...e/shardingsphere/elasticjob/infra/env/IpUtils.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9lbnYvSXBVdGlscy5qYXZh) | `60.00% <0.00%> (-4.62%)` | `0.00% <0.00%> (ø%)` | |
   | [...ticjob/lite/internal/snapshot/SnapshotService.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc25hcHNob3QvU25hcHNob3RTZXJ2aWNlLmphdmE=) | `80.95% <0.00%> (-1.59%)` | `1.00% <0.00%> (ø%)` | |
   | [...sticjob/reg/zookeeper/ZookeeperRegistryCenter.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLXJlZ2lzdHJ5LWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9yZWcvem9va2VlcGVyL1pvb2tlZXBlclJlZ2lzdHJ5Q2VudGVyLmphdmE=) | `72.44% <0.00%> (-0.79%)` | `32.00% <0.00%> (-1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=footer). Last update [1153201...3f393fc](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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] wwj-go commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
wwj-go commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705928469


   @TeslaCN , I’m sorry that I closed the PR just now due to a mistake, and I resubmitted another.


----------------------------------------------------------------
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] TeslaCN commented on a change in pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on a change in pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#discussion_r502144791



##########
File path: elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoader.java
##########
@@ -76,4 +81,58 @@ private static Object newServiceInstance(final Class<?> clazz) {
             throw new ServiceLoaderInstantiationException(clazz, ex.getCause());
         }
     }
+
+    /**
+     * Register typeSPI service.
+     *
+     * @param typedService specific service type
+     * @param <T> type of service
+     */
+    public static <T> void registerTypedService(final Class<T> typedService) {
+        if (!TypedSPI.class.isAssignableFrom(typedService)) {
+            throw new IllegalArgumentException("Cannot register @" + typedService.getName() + "as a typed service, because its not a subClass of @" + typedService);
+        }
+        if (TYPED_SERVICES.containsKey(typedService)) {
+            return;
+        }
+        ServiceLoader.load(typedService).forEach(each -> registerTypedServiceClass(typedService, (TypedSPI) each));
+    }
+
+    private static <T> void registerTypedServiceClass(final Class<T> typedService, final TypedSPI instance) {
+        TYPED_SERVICES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance);
+        TYPED_SERVICE_CLASSES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance.getClass());
+    }
+
+    /**
+     * Get cached instance.
+     *
+     * @param typedService service type
+     * @param type         specific service type
+     * @param <T>          specific type of service
+     * @return cached service instance
+     */
+    public static <T extends TypedSPI> T getCachedInstance(final Class<T> typedService, final String type) {
+        T instance = TYPED_SERVICES.containsKey(typedService) ? (T) TYPED_SERVICES.get(typedService).get(type) : null;
+        if (instance == null) {

Review comment:
       Have constants on the left and variable on the right in = and equals conditional expressions; Have variable on the left and constants on the right in greater than and less than conditional expressions.
   Ref https://shardingsphere.apache.org/community/en/contribute/code-conduct/

##########
File path: elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/spi/ElasticJobServiceLoader.java
##########
@@ -76,4 +81,58 @@ private static Object newServiceInstance(final Class<?> clazz) {
             throw new ServiceLoaderInstantiationException(clazz, ex.getCause());
         }
     }
+
+    /**
+     * Register typeSPI service.
+     *
+     * @param typedService specific service type
+     * @param <T> type of service
+     */
+    public static <T> void registerTypedService(final Class<T> typedService) {
+        if (!TypedSPI.class.isAssignableFrom(typedService)) {
+            throw new IllegalArgumentException("Cannot register @" + typedService.getName() + "as a typed service, because its not a subClass of @" + typedService);
+        }
+        if (TYPED_SERVICES.containsKey(typedService)) {
+            return;
+        }
+        ServiceLoader.load(typedService).forEach(each -> registerTypedServiceClass(typedService, (TypedSPI) each));
+    }
+
+    private static <T> void registerTypedServiceClass(final Class<T> typedService, final TypedSPI instance) {
+        TYPED_SERVICES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance);
+        TYPED_SERVICE_CLASSES.computeIfAbsent(typedService, unused -> new ConcurrentHashMap<>()).putIfAbsent(instance.getType(), instance.getClass());
+    }
+
+    /**
+     * Get cached instance.
+     *
+     * @param typedService service type
+     * @param type         specific service type
+     * @param <T>          specific type of service
+     * @return cached service instance
+     */
+    public static <T extends TypedSPI> T getCachedInstance(final Class<T> typedService, final String type) {
+        T instance = TYPED_SERVICES.containsKey(typedService) ? (T) TYPED_SERVICES.get(typedService).get(type) : null;
+        if (instance == null) {
+            throw new JobConfigurationException("Cannot find a cached typed service instance by the interface: @" + typedService.getName() + "and type: " + type);
+        }
+        return instance;
+    }
+
+    /**
+     * New typed instance.
+     *
+     * @param typedService service type
+     * @param type         specific service type
+     * @param <T>          specific type of service
+     * @return specific typed service instance
+     */
+    public static <T extends TypedSPI> T newTypedServiceInstance(final Class<T> typedService, final String type) {
+        Class<?> instanceClass = TYPED_SERVICE_CLASSES.containsKey(typedService) ? TYPED_SERVICE_CLASSES.get(typedService).get(type) : null;
+        if (instanceClass == null) {

Review comment:
       Have constants on the left and variable on the right in = and equals conditional expressions; Have variable on the left and constants on the right in greater than and less than conditional expressions.
   Ref https://shardingsphere.apache.org/community/en/contribute/code-conduct/




----------------------------------------------------------------
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] jiang2015 commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
jiang2015 commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705943627


   It is good to learn how to use java 0OPTIONAL.


----------------------------------------------------------------
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] TeslaCN commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705930833


   @wwj-go Thanks for you contribution. You can push commits instead of opening another 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] jiang2015 commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
jiang2015 commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705943627


   It is good to learn how to use java 0OPTIONAL.


----------------------------------------------------------------
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] wwj-go commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
wwj-go commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705928469






----------------------------------------------------------------
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] codecov-io commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705930074


   # [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=h1) Report
   > Merging [#1548](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/11532014e40561ea4bb46e93a2592e5b072a6f8c?el=desc) will **decrease** coverage by `0.20%`.
   > The diff coverage is `62.06%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z)](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1548      +/-   ##
   ============================================
   - Coverage     85.30%   85.10%   -0.21%     
   + Complexity      102      101       -1     
   ============================================
     Files           247      247              
     Lines          5676     5685       +9     
     Branches        890      892       +2     
   ============================================
   - Hits           4842     4838       -4     
   - Misses          524      531       +7     
   - Partials        310      316       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...cjob/infra/listener/ElasticJobListenerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9saXN0ZW5lci9FbGFzdGljSm9iTGlzdGVuZXJGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [.../elasticjob/infra/spi/ElasticJobServiceLoader.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9zcGkvRWxhc3RpY0pvYlNlcnZpY2VMb2FkZXIuamF2YQ==) | `34.37% <52.63%> (+34.37%)` | `0.00 <0.00> (ø)` | |
   | [...asticjob/error/handler/JobErrorHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1lcnJvci1oYW5kbGVyL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci10eXBlL2VsYXN0aWNqb2ItZXJyb3ItaGFuZGxlci1nZW5lcmFsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2Vycm9yL2hhbmRsZXIvSm9iRXJyb3JIYW5kbGVyRmFjdG9yeS5qYXZh) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...a/handler/sharding/JobShardingStrategyFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3NoYXJkaW5nL0pvYlNoYXJkaW5nU3RyYXRlZ3lGYWN0b3J5LmphdmE=) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...r/threadpool/JobExecutorServiceHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9oYW5kbGVyL3RocmVhZHBvb2wvSm9iRXhlY3V0b3JTZXJ2aWNlSGFuZGxlckZhY3RvcnkuamF2YQ==) | `100.00% <100.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...e/shardingsphere/elasticjob/infra/env/IpUtils.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9lbnYvSXBVdGlscy5qYXZh) | `60.00% <0.00%> (-4.62%)` | `0.00% <0.00%> (ø%)` | |
   | [...ticjob/lite/internal/snapshot/SnapshotService.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc25hcHNob3QvU25hcHNob3RTZXJ2aWNlLmphdmE=) | `80.95% <0.00%> (-1.59%)` | `1.00% <0.00%> (ø%)` | |
   | [...sticjob/reg/zookeeper/ZookeeperRegistryCenter.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLXJlZ2lzdHJ5LWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9yZWcvem9va2VlcGVyL1pvb2tlZXBlclJlZ2lzdHJ5Q2VudGVyLmphdmE=) | `72.44% <0.00%> (-0.79%)` | `32.00% <0.00%> (-1.00%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=footer). Last update [1153201...3f393fc](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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 merged pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548


   


----------------------------------------------------------------
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] wwj-go commented on pull request #1548: Redesign SPI factory to make them into one class (#1537)

Posted by GitBox <gi...@apache.org>.
wwj-go commented on pull request #1548:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1548#issuecomment-705946166


   About OPTIONAL, can you give some more specific suggestions in conjunction with this PR?
   > It is good to learn how to use java 0OPTIONAL.
   
   


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