Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translator module improvements #2876

Merged
merged 21 commits into from
Apr 14, 2020

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Mar 4, 2020

This PR improves all kapua-translator modules.

Related Issue
None

Description of the solution adopted

  • Translator location has been improved and a cache has been added to avoid looping trough the ServiceLoader for each Translator.getTranslatorFor(...)
  • Exceptions have been refactored and moved to kapua-transport-api module to make them catchable from invoking code (replaces the general usage of carch (KapuaException e) {. Also exception messages have been added to prime a user-friendly message.
  • Implementation of the translators have been improved and code has gone trough a cleanup, where possibile.
  • A tons of Javadoc has been added.

Screenshots
None

Any side note on the changes made
Small fixes here and there where found.

@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label Mar 4, 2020
@Coduz Coduz requested a review from lorthirk March 4, 2020 14:20
@Coduz Coduz force-pushed the feature-translatorImprovements branch from fa643e8 to 466724d Compare March 4, 2020 14:47
@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

Merging #2876 into develop will increase coverage by 1.20%.
The diff coverage is 44.56%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2876      +/-   ##
=============================================
+ Coverage      54.30%   55.50%   +1.20%     
- Complexity      2381     2556     +175     
=============================================
  Files           1040     1048       +8     
  Lines          22600    22783     +183     
  Branches        2039     2045       +6     
=============================================
+ Hits           12272    12645     +373     
+ Misses          9414     9189     -225     
- Partials         914      949      +35     
Impacted Files Coverage Δ Complexity Δ
...n/java/org/eclipse/kapua/message/KapuaPayload.java 50.00% <0.00%> (-50.00%) 0.00 <0.00> (ø)
...java/org/eclipse/kapua/KapuaRuntimeErrorCodes.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...pua/service/device/call/message/DevicePayload.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...a/service/device/call/kura/KuraDeviceCallImpl.java 70.68% <0.00%> (ø) 10.00 <0.00> (ø)
.../service/device/call/kura/app/SnapshotMetrics.java 0.00% <0.00%> (-85.72%) 0.00 <0.00> (-2.00)
.../service/device/call/message/kura/KuraChannel.java 90.00% <0.00%> (-10.00%) 9.00 <0.00> (-1.00)
...e/device/call/message/kura/app/KuraAppChannel.java 70.00% <0.00%> (-30.00%) 4.00 <0.00> (ø)
...ssage/kura/app/notification/KuraNotifyChannel.java 61.53% <0.00%> (-38.47%) 3.00 <1.00> (ø)
...ssage/kura/app/notification/KuraNotifyPayload.java 62.22% <ø> (+1.35%) 12.00 <0.00> (ø)
...l/message/kura/app/request/KuraRequestChannel.java 66.66% <0.00%> (-11.12%) 9.00 <0.00> (ø)
... and 142 more

@Coduz Coduz force-pushed the feature-translatorImprovements branch 2 times, most recently from 8d76583 to 0501914 Compare March 4, 2020 16:32
@Coduz Coduz force-pushed the feature-translatorImprovements branch 4 times, most recently from 072c9ac to 1407dfe Compare March 13, 2020 14:21
@Coduz Coduz force-pushed the feature-translatorImprovements branch 4 times, most recently from 165fb85 to 26d3266 Compare March 21, 2020 10:10
@Coduz Coduz force-pushed the feature-translatorImprovements branch 5 times, most recently from 0cb0638 to 0b175eb Compare March 27, 2020 10:19
@Coduz Coduz added the Waitfor/Test This issue/PR needs tests implementation to be properly resolved label Apr 1, 2020
@Coduz Coduz force-pushed the feature-translatorImprovements branch 2 times, most recently from b6d7036 to 6784649 Compare April 3, 2020 08:21
Coduz added 6 commits April 14, 2020 11:50
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…t-mqtt module

Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…t-jms module

Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Coduz added 15 commits April 14, 2020 11:50
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…or-api

Signed-off-by: coduz <alberto.codutti@eurotech.com>
…apua-translator-kapua-kura

Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…apua-translator-kura-jms

Signed-off-by: coduz <alberto.codutti@eurotech.com>
…apua-translator-kura-mqtt

Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…all-kura module

Signed-off-by: coduz <alberto.codutti@eurotech.com>
@Coduz Coduz force-pushed the feature-translatorImprovements branch from 6784649 to 3a83600 Compare April 14, 2020 10:01
@Coduz Coduz merged commit 70bdb4f into eclipse-kapua:develop Apr 14, 2020
@Coduz Coduz deleted the feature-translatorImprovements branch April 14, 2020 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua Waitfor/Test This issue/PR needs tests implementation to be properly resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants