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
Send license information to Management Center #13451
Send license information to Management Center #13451
Conversation
|
||
import com.eclipsesource.json.JsonObject; | ||
|
||
public class LicenseInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this class in the monitor,impl package? This package should be used for e..g MapStatisticsImpl. It should not be used as a dumping ground for Member->MC serialization logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this class in the monitor,impl package?
Because every other class for Member -> MC serialization logic was already here (such as WanSyncState
etc).
Do you think it would be better under for e.g. com.hazelcast.internal.license
? Any other suggestions?
@@ -0,0 +1,68 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this class to com.hazelcast.internal.management?
This class doesn't belong to 'monitor'. This is reserved for the statistics implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -77,6 +77,7 @@ | |||
private HotRestartState hotRestartState = new HotRestartStateImpl(); | |||
private ClusterHotRestartStatusDTO clusterHotRestartStatus = new ClusterHotRestartStatusDTO(); | |||
private WanSyncState wanSyncState = new WanSyncStateImpl(); | |||
private LicenseInfo licenseInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this class to com.hazelcast.internal.management ?
This class also doesn't belong in this package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a good idea to move MemberStateImpl
in this PR. Note that this PR is against maintenance-3.x
.
I know you have reorganized MC related packages in master
(though MemberStateImpl
is still under com.hazelcast.monitor.impl
there). Maybe we can do this in the forward port of this PR?
@emre-aydin I have a branch with similar changes to send the licence info over to MC, and it only keeps the licence related stuff to the EE side where its relevant. Here we expose the DTO to the OSS which is a side-effect. If you don't mind, we can use my changes instead, and you can back-port them accordingly to 3.10.x WDYT? |
@tkountis sounds good, closing this one. |
@tkountis I assume you haven't pushed the branch. Can you please let me know when you create a PR so that I can change the MC side accordingly? |
Goal is to show information about the cluster license on MC UI. For this, we're sending the license information to MC.
Since, OSS clusters don't have licenses, it is sent as
null
for OSS clusters. The field is added in OSS project but filled in the EE project because the object structure needs to be the same for both OSS and EE cluster. We extract license information in EE code because we don't have the required dependency to license extractor in the OSS project.