Method to get all hostnames for a ClusterGroup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Method to get all hostnames for a ClusterGroup

Atri Sharma
Folks,

I have been trying to get list of all hostnames for a given ClusterGroup. I
think current solution is to get nodes() and then iterate over it and
append node hostNames() to a string array.

Is there method for directly getting the list?

--
Regards,

Atri
*l'apprenant*
Reply | Threaded
Open this post in threaded view
|

Re: Method to get all hostnames for a ClusterGroup

yzhdanov
I think your solution is fine, but you should add host names to a set (to
avoid duplicates).

--Yakov

2015-06-06 21:36 GMT+03:00 Atri Sharma <[hidden email]>:

> Folks,
>
> I have been trying to get list of all hostnames for a given ClusterGroup. I
> think current solution is to get nodes() and then iterate over it and
> append node hostNames() to a string array.
>
> Is there method for directly getting the list?
>
> --
> Regards,
>
> Atri
> *l'apprenant*
>
Reply | Threaded
Open this post in threaded view
|

Re: Method to get all hostnames for a ClusterGroup

Atri Sharma
Will put a patch
On 9 Jun 2015 16:53, "Yakov Zhdanov" <[hidden email]> wrote:

> I think your solution is fine, but you should add host names to a set (to
> avoid duplicates).
>
> --Yakov
>
> 2015-06-06 21:36 GMT+03:00 Atri Sharma <[hidden email]>:
>
> > Folks,
> >
> > I have been trying to get list of all hostnames for a given
> ClusterGroup. I
> > think current solution is to get nodes() and then iterate over it and
> > append node hostNames() to a string array.
> >
> > Is there method for directly getting the list?
> >
> > --
> > Regards,
> >
> > Atri
> > *l'apprenant*
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Method to get all hostnames for a ClusterGroup

Atri Sharma
Hi,

Patch is posted.

https://issues.apache.org/jira/browse/IGNITE-1006

Please see and let me know your feedback and comments.

On Tue, Jun 9, 2015 at 6:07 PM, Atri Sharma <[hidden email]> wrote:

> Will put a patch
> On 9 Jun 2015 16:53, "Yakov Zhdanov" <[hidden email]> wrote:
>
>> I think your solution is fine, but you should add host names to a set (to
>> avoid duplicates).
>>
>> --Yakov
>>
>> 2015-06-06 21:36 GMT+03:00 Atri Sharma <[hidden email]>:
>>
>> > Folks,
>> >
>> > I have been trying to get list of all hostnames for a given
>> ClusterGroup. I
>> > think current solution is to get nodes() and then iterate over it and
>> > append node hostNames() to a string array.
>> >
>> > Is there method for directly getting the list?
>> >
>> > --
>> > Regards,
>> >
>> > Atri
>> > *l'apprenant*
>> >
>>
>


--
Regards,

Atri
*l'apprenant*