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/12/01 02:33:35 UTC

[GitHub] [shardingsphere] dmsolr opened a new pull request #8429: Implemented Pluginloader

dmsolr opened a new pull request #8429:
URL: https://github.com/apache/shardingsphere/pull/8429


   


----------------------------------------------------------------
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] yu199195 commented on a change in pull request #8429: Implemented Pluginloader

Posted by GitBox <gi...@apache.org>.
yu199195 commented on a change in pull request #8429:
URL: https://github.com/apache/shardingsphere/pull/8429#discussion_r533041163



##########
File path: shardingsphere-agent/shardingsphere-agent-bootstrap/src/main/java/org/apache/shardingsphere/agent/bootstrap/ShardingSphereAgent.java
##########
@@ -48,20 +48,24 @@ public static void premain(final String agentArgs, final Instrumentation instrum
         AgentConfiguration agentConfiguration = AgentConfigurationLoader.load();
         SingletonHolder.INSTANCE.put(agentConfiguration);
 
-        ByteBuddy byteBuddy = new ByteBuddy().with(TypeValidation.ENABLED);
-
-        AgentBuilder builder = new AgentBuilder.Default()
+        final ByteBuddy byteBuddy = new ByteBuddy().with(TypeValidation.ENABLED);

Review comment:
       remove final




----------------------------------------------------------------
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] codecov-io edited a comment on pull request #8429: Implemented Pluginloader

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=h1) Report
   > Merging [#8429](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=desc) (2277e24) into [master](https://codecov.io/gh/apache/shardingsphere/commit/31fb74fd516b5064b0ceb70e62be58bfd2c6945a?el=desc) (31fb74f) will **decrease** coverage by `0.28%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/8429/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8429      +/-   ##
   ============================================
   - Coverage     73.46%   73.17%   -0.29%     
     Complexity      603      603              
   ============================================
     Files          1508     1510       +2     
     Lines         23905    23999      +94     
     Branches       4224     4232       +8     
   ============================================
     Hits          17561    17561              
   - Misses         5184     5278      +94     
     Partials       1160     1160              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...ingsphere/agent/bootstrap/ShardingSphereAgent.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9hZ2VudC9ib290c3RyYXAvU2hhcmRpbmdTcGhlcmVBZ2VudC5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...ngsphere/agent/core/ShardingSphereTransformer.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9TaGFyZGluZ1NwaGVyZVRyYW5zZm9ybWVyLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [.../agent/core/exception/AdviceNotFoundException.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9leGNlcHRpb24vQWR2aWNlTm90Rm91bmRFeGNlcHRpb24uamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
   | [...hardingsphere/agent/core/plugin/Configuration.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
   | [...ngsphere/agent/core/plugin/PluginAdviceDefine.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vUGx1Z2luQWR2aWNlRGVmaW5lLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...shardingsphere/agent/core/plugin/PluginLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vUGx1Z2luTG9hZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8429?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/pull/8429?src=pr&el=footer). Last update [31fb74f...07de2f2](https://codecov.io/gh/apache/shardingsphere/pull/8429?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] yu199195 commented on a change in pull request #8429: Implemented Pluginloader

Posted by GitBox <gi...@apache.org>.
yu199195 commented on a change in pull request #8429:
URL: https://github.com/apache/shardingsphere/pull/8429#discussion_r533048663



##########
File path: shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/plugin/PluginLoader.java
##########
@@ -62,18 +180,21 @@ public boolean containsType(final TypeDescription typeDescription) {
      * @return the plugin definition configurations.
      */
     public PluginAdviceDefine loadPluginAdviceDefine(final TypeDescription typeDescription) {
-        return null;
+        if (pluginDefineMap.containsKey(typeDescription.getTypeName())) {
+            return pluginDefineMap.get(typeDescription.getTypeName());
+        }
+        throw new AdviceNotFoundException();
     }
 
     /**
      * To get or create instance of the advice class. Create new one and caching when it is not exist.
      *
      * @param classNameOfAdvice the class name of advice
-     * @param <T> the advice type.
+     * @param <T>               the advice type.

Review comment:
       1 black 




----------------------------------------------------------------
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] yu199195 merged pull request #8429: Implemented Pluginloader

Posted by GitBox <gi...@apache.org>.
yu199195 merged pull request #8429:
URL: https://github.com/apache/shardingsphere/pull/8429


   


----------------------------------------------------------------
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] codecov-io commented on pull request #8429: Implemented Pluginloader

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=h1) Report
   > Merging [#8429](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=desc) (2277e24) into [master](https://codecov.io/gh/apache/shardingsphere/commit/31fb74fd516b5064b0ceb70e62be58bfd2c6945a?el=desc) (31fb74f) will **decrease** coverage by `0.28%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/8429/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8429      +/-   ##
   ============================================
   - Coverage     73.46%   73.17%   -0.29%     
     Complexity      603      603              
   ============================================
     Files          1508     1510       +2     
     Lines         23905    23999      +94     
     Branches       4224     4232       +8     
   ============================================
     Hits          17561    17561              
   - Misses         5184     5278      +94     
     Partials       1160     1160              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/8429?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...ingsphere/agent/bootstrap/ShardingSphereAgent.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9hZ2VudC9ib290c3RyYXAvU2hhcmRpbmdTcGhlcmVBZ2VudC5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...ngsphere/agent/core/ShardingSphereTransformer.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9TaGFyZGluZ1NwaGVyZVRyYW5zZm9ybWVyLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [.../agent/core/exception/AdviceNotFoundException.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9leGNlcHRpb24vQWR2aWNlTm90Rm91bmRFeGNlcHRpb24uamF2YQ==) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
   | [...hardingsphere/agent/core/plugin/Configuration.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vQ29uZmlndXJhdGlvbi5qYXZh) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (?)` | |
   | [...ngsphere/agent/core/plugin/PluginAdviceDefine.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vUGx1Z2luQWR2aWNlRGVmaW5lLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   | [...shardingsphere/agent/core/plugin/PluginLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/8429/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9wbHVnaW4vUGx1Z2luTG9hZGVyLmphdmE=) | `0.00% <0.00%> (ø)` | `0.00 <0.00> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8429?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/pull/8429?src=pr&el=footer). Last update [31fb74f...07de2f2](https://codecov.io/gh/apache/shardingsphere/pull/8429?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