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

Simplifies member attributes #14974

Merged
merged 1 commit into from May 9, 2019

Conversation

@mustafaiman
Copy link
Contributor

mustafaiman commented May 3, 2019

Removes primitives support for [set|get]Attribute operations. All member attributes including DiscoveryStrategy#discoverLocalMetadata and spring supports only string attributes now.

Fixes #14907

@mustafaiman mustafaiman force-pushed the mustafaiman:unify-member-attributes branch from 8a37a00 to 0c186b4 May 3, 2019
@mustafaiman mustafaiman changed the title Unify member attributes Simplifies member attributes May 3, 2019
@mustafaiman mustafaiman added this to the 4.0 milestone May 3, 2019
@mustafaiman mustafaiman force-pushed the mustafaiman:unify-member-attributes branch from 0c186b4 to cc8d6d9 May 3, 2019
@mustafaiman mustafaiman marked this pull request as ready for review May 3, 2019
Removes primitives support for [set|get]Attribute operations. All member attributes including DiscoveryStrategy#discoverLocalMetadata and spring supports only string attributes now.

Fixes #14907
@mustafaiman mustafaiman force-pushed the mustafaiman:unify-member-attributes branch from cc8d6d9 to ef1e163 May 6, 2019
@mustafaiman

This comment has been minimized.

Copy link
Contributor Author

mustafaiman commented May 8, 2019

@mmedenjak I updated the PR according to the comments. Can you have another look?

@mustafaiman mustafaiman requested a review from sancar May 8, 2019
@sancar
sancar approved these changes May 9, 2019
@mustafaiman mustafaiman merged commit 6ded404 into hazelcast:master May 9, 2019
1 check passed
1 check passed
default Test PASSed.
Details
@mustafaiman mustafaiman deleted the mustafaiman:unify-member-attributes branch May 9, 2019
@mesutcelik

This comment has been minimized.

Copy link
Contributor

mesutcelik commented May 16, 2019

This PR breaks all discovery plugins when they move to hazelcast 4.0. We need to mention that in our migration plan. Following plugins can not compile against hazelcast 4.0-SNAPSHOT anymore. cc: @Serdaro @dbrimley @mmedenjak

  • hazelcast-kubernetes
  • hazelcast-aws
  • hazelcast-azure
  • hazelcast-gcp
  • hazelcast-eureka

I know there are a bunch of other community plugins too.

Those plugins have to make releases with hazelcast 4.0 Beta release...

@mmedenjak

This comment has been minimized.

Copy link
Contributor

mmedenjak commented May 16, 2019

@mesutcelik is this because of the change in DiscoveryStrategy?

@mesutcelik

This comment has been minimized.

Copy link
Contributor

mesutcelik commented May 16, 2019

SimpleDiscoveryNode is the one apparently...

[ [1;31mERROR [m] <http://jenkins.hazelcast.com/job/Eureka-master/ws/src/main/java/com/hazelcast/eureka/one/EurekaOneDiscoveryStrategy.java>:[301,27] no suitable constructor found for SimpleDiscoveryNode(com.hazelcast.nio.Address,java.util.Map<java.lang.String,java.lang.Object>)
    constructor com.hazelcast.spi.discovery.SimpleDiscoveryNode.SimpleDiscoveryNode(com.hazelcast.nio.Address,java.util.Map<java.lang.String,java.lang.String>) is not applicable
      (argument mismatch; java.util.Map<java.lang.String,java.lang.Object> cannot be converted to java.util.Map<java.lang.String,java.lang.String>)
    constructor com.hazelcast.spi.discovery.SimpleDiscoveryNode.SimpleDiscoveryNode(com.hazelcast.nio.Address,com.hazelcast.nio.Address) is not applicable
      (argument mismatch; java.util.Map<java.lang.String,java.lang.Object> cannot be converted to com.hazelcast.nio.Address)
[ [1;31mERROR [m] <http://jenkins.hazelcast.com/job/Eureka-master/ws/src/main/java/com/hazelcast/eureka/one/EurekaOneDiscoveryStrategy.java>:[313,19] no suitable constructor found for SimpleDiscoveryNode(com.hazelcast.nio.Address,java.util.Map<java.lang.String,java.lang.Object>)
    constructor com.hazelcast.spi.discovery.SimpleDiscoveryNode.SimpleDiscoveryNode(com.hazelcast.nio.Address,java.util.Map<java.lang.String,java.lang.String>) is not applicable
      (argument mismatch; java.util.Map<java.lang.String,java.lang.Object> cannot be converted to java.util.Map<java.lang.String,java.lang.String>)
    constructor com.hazelcast.spi.discovery.SimpleDiscoveryNode.SimpleDiscoveryNode(com.hazelcast.nio.Address,com.hazelcast.nio.Address) is not applicable
      (argument mismatch; java.util.Map<java.lang.String,java.lang.Object> cannot be converted to com.hazelcast.nio.Address)
@mustafaiman

This comment has been minimized.

Copy link
Contributor Author

mustafaiman commented May 16, 2019

@mesutcelik @mmedenjak properties of DiscoveryNode still supports Object properties. It is the only constructor of SimpleDiscoveryNode that was changed accidentally. Should be fixed by changing the constructor accordingly.

@mustafaiman

This comment has been minimized.

Copy link
Contributor Author

mustafaiman commented May 16, 2019

Still DiscoveryStrategy#discoverLocalMetadata is changed and that requires a change in plugins I guess.

@mesutcelik

This comment has been minimized.

Copy link
Contributor

mesutcelik commented May 17, 2019

Yes. That is true. However, it is only used by plugins which support ZONE_AWARE feature like hazelcast-kubernetes....

[ [1;31mERROR [m] <http://jenkins.hazelcast.com/job/Kubernetes-master/ws/src/main/java/com/hazelcast/kubernetes/HazelcastKubernetesDiscoveryStrategy.java>:[67,32] discoverLocalMetadata() in com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy cannot implement discoverLocalMetadata() in com.hazelcast.spi.discovery.DiscoveryStrategy
  return type java.util.Map<java.lang.String,java.lang.Object> is not compatible with java.util.Map<java.lang.String,java.lang.String>
[ [1;31mERROR [m] <http://jenkins.hazelcast.com/job/Kubernetes-master/ws/src/main/java/com/hazelcast/kubernetes/HazelcastKubernetesDiscoveryStrategy.java>:[66,5] method does not override or implement a method from a supertype
[ [1;31mERROR [m] <http://jenkins.hazelcast.com/job/Kubernetes-master/ws/src/main/java/com/hazelcast/kubernetes/KubernetesApiEndpointResolver.java>:[76,113] incompatible types: java.util.Map<java.lang.String,java.lang.Object> cannot be converted to java.util.Map<java.lang.String,java.lang.String>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.