Hi Gayashan,

Yes, thats the implementation that is being carried out now. The
coordinator node's address will be stored in a hazelcast map so that they
can be accessed by any node.

Thanks,
Hemika

Hemika Kodikara
Software Engineer
WSO2 Inc.
lean . enterprise . middleware
http://wso2.com

Mobile : +94777688882

On Wed, Jan 14, 2015 at 5:24 PM, Gayashan Amarasinghe <[email protected]>
wrote:

> Hi Hemika,
>
> Perhaps you can use a CoordinatedActivity [1] to publish the coordinator
> information which can be used by your component. WDYT? AFAIK
> CorrdinatedActivities are executed by a node (and only by the current
> coordinator) after it becomes a coordinator.
>
> [1]
> https://github.com/wso2/carbon4-kernel/blob/master/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/clustering/api/CoordinatedActivity.java
>
> Thanks.
> /Gayashan
>
> On Wed, Jan 14, 2015 at 5:04 PM, Hemika Kodikara <[email protected]> wrote:
>
>> Hi Azeez,
>>
>> Again wont that give the socket address if the current node is the
>> coordinator ?
>>
>> For a scenario, lets say that there are 4 node as n1, n2, n3 and n4. Lets
>> also say that n1 is the coordinator node. The problem is that from n2 node,
>> how to know which one is the coordinator node ? and its socket address ?.
>>
>> I can only check whether that n2 is the coordinator node or not. In the
>> UI of the n2 node, I need to show the coordinator node's(n1) socket
>> address. But how to to get that ?
>>
>> Hope my clarification will help.
>>
>> Thanks,
>> Hemika
>>
>> Hemika Kodikara
>> Software Engineer
>> WSO2 Inc.
>> lean . enterprise . middleware
>> http://wso2.com
>>
>> Mobile : +94777688882
>>
>> On Tue, Jan 13, 2015 at 3:10 PM, Afkham Azeez <[email protected]> wrote:
>>
>>> if(hazelcastClusteringAgent.isCoordinator()){
>>>             primaryHazelcastInstance.getCluster().getLocalMember().
>>> getSocketAddress()
>>> }
>>>
>>> On Tue, Jan 13, 2015 at 3:04 PM, Sajini De Silva <[email protected]>
>>> wrote:
>>>
>>>> Hi Azeez,
>>>>
>>>> primaryHazelcastInstance.getCluster().getLocalMember().getSocketAddress()
>>>> will give the socket address of the node which this method is calling.
>>>>
>>>> Is there a way to get the coordinator node's IP address and port for
>>>> the nodes other than the coordinator? In my knowledge currently this
>>>> feature is not supported by kernel.
>>>>
>>>> Thank you,
>>>> Sajini
>>>>
>>>> On Tue, Jan 13, 2015 at 2:44 PM, Afkham Azeez <[email protected]> wrote:
>>>>
>>>>>
>>>>> primaryHazelcastInstance.getCluster().getLocalMember().getSocketAddress()
>>>>>
>>>>>
>>>>> On Tue, Jan 13, 2015 at 1:40 PM, Hemika Kodikara <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi Azeez,
>>>>>>
>>>>>> Yes, HazelcastInstance is there. But it doesn't provide a method to
>>>>>> get the coordinator node IP address and so.
>>>>>>
>>>>>> Thanks,
>>>>>> Hemika
>>>>>>
>>>>>> Hemika Kodikara
>>>>>> Software Engineer
>>>>>> WSO2 Inc.
>>>>>> lean . enterprise . middleware
>>>>>> http://wso2.com
>>>>>>
>>>>>> Mobile : +94777688882
>>>>>>
>>>>>> On Tue, Jan 13, 2015 at 1:30 PM, Afkham Azeez <[email protected]> wrote:
>>>>>>
>>>>>>> Yes, get the HazelcastInstance OSGi service, and then using
>>>>>>> Hazelcast APIs you should be able to get the required information.
>>>>>>>
>>>>>>> Azeez
>>>>>>>
>>>>>>> On Tue, Jan 13, 2015 at 1:25 PM, Hemika Kodikara <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Looping in Azeez, Sameera and Kishanthan.
>>>>>>>>
>>>>>>>> Hemika Kodikara
>>>>>>>> Software Engineer
>>>>>>>> WSO2 Inc.
>>>>>>>> lean . enterprise . middleware
>>>>>>>> http://wso2.com
>>>>>>>>
>>>>>>>> Mobile : +94777688882
>>>>>>>>
>>>>>>>> On Tue, Jan 13, 2015 at 12:35 PM, Hemika Kodikara <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>> I have a requirement to show the IP addresses and ports of the
>>>>>>>>> nodes in a cluster on a UI page. But I also have to indicate which 
>>>>>>>>> node is
>>>>>>>>> the coordinator node. Currently I am only able to to find whether the
>>>>>>>>> current node is the coordinator node or not using the "isCoordinator"
>>>>>>>>> method in "HazelcastClusteringAgent" class.
>>>>>>>>>
>>>>>>>>> Is there way to find the coordinator node's IP address and port of
>>>>>>>>> the cluster?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Hemika
>>>>>>>>>
>>>>>>>>> Hemika Kodikara
>>>>>>>>> Software Engineer
>>>>>>>>> WSO2 Inc.
>>>>>>>>> lean . enterprise . middleware
>>>>>>>>> http://wso2.com
>>>>>>>>>
>>>>>>>>> Mobile : +94777688882
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Afkham Azeez*
>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>> * <http://www.apache.org/>*
>>>>>>> *email: **[email protected]* <[email protected]>
>>>>>>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>>>>>>> *http://blog.afkham.org* <http://blog.afkham.org>
>>>>>>> *twitter: **http://twitter.com/afkham_azeez*
>>>>>>> <http://twitter.com/afkham_azeez>
>>>>>>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>>>>>>> <http://lk.linkedin.com/in/afkhamazeez>*
>>>>>>>
>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Afkham Azeez*
>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>> * <http://www.apache.org/>*
>>>>> *email: **[email protected]* <[email protected]>
>>>>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>>>>> *http://blog.afkham.org* <http://blog.afkham.org>
>>>>> *twitter: **http://twitter.com/afkham_azeez*
>>>>> <http://twitter.com/afkham_azeez>
>>>>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>>>>> <http://lk.linkedin.com/in/afkhamazeez>*
>>>>>
>>>>> *Lean . Enterprise . Middleware*
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sajini De SIlva
>>>> Software Engineer; WSO2 Inc.; http://wso2.com ,
>>>> Email: [email protected]
>>>> Blog: http://sajinid.blogspot.com/
>>>> Git hub profile: https://github.com/sajinidesilva
>>>>
>>>> Phone: +94 712797729
>>>>
>>>>
>>>
>>>
>>> --
>>> *Afkham Azeez*
>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>> Member; Apache Software Foundation; http://www.apache.org/
>>> * <http://www.apache.org/>*
>>> *email: **[email protected]* <[email protected]>
>>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>>> *http://blog.afkham.org* <http://blog.afkham.org>
>>> *twitter: **http://twitter.com/afkham_azeez*
>>> <http://twitter.com/afkham_azeez>
>>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>>> <http://lk.linkedin.com/in/afkhamazeez>*
>>>
>>> *Lean . Enterprise . Middleware*
>>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Gayashan Amarasinghe*
> Software Engineer | Platform TG
> WSO2, Inc. | http://wso2.com
> lean. enterprise. middleware
>
> Mobile : +94718314517
> Blog : gayashan-a.blogspot.com
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to