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

Send license information to Management Center #13451

Closed
wants to merge 5 commits into from
Closed

Send license information to Management Center #13451

wants to merge 5 commits into from

Conversation

emre-aydin
Copy link
Contributor

@emre-aydin emre-aydin commented Jul 16, 2018

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.


import com.eclipsesource.json.JsonObject;

public class LicenseInfo {
Copy link
Contributor

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.

Copy link
Contributor Author

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 @@
/*
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@tkountis
Copy link
Contributor

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

@emre-aydin
Copy link
Contributor Author

@tkountis sounds good, closing this one.

@emre-aydin emre-aydin closed this Jul 17, 2018
@emre-aydin
Copy link
Contributor Author

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

@emre-aydin emre-aydin deleted the send-license-to-mc branch July 24, 2018 09:39
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants