You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@helix.apache.org by Varun Sharma <va...@pinterest.com> on 2014/09/19 22:22:23 UTC

SPECTATOR role not returning instances

I am trying to get the instance list for a resource and its returning me an
empty list of instances for the resource. When I look at the external view,
the partition is online on 3 different hosts.

,"72":{

      "hdfsterrapin-a-datanode-5b1b2671":"ONLINE"

      ,"hdfsterrapin-a-datanode-911c21bb":"ONLINE"

      ,"hdfsterrapin-a-datanode-fc1d20d6":"ONLINE"

    }

I am using helix 0.6.3 - my resource names contain '$' sign - I have
verified this to be not a problem for PARTICIPANT and CONTROLLER roles.
What might be the reason behind this ? Here is my code:

Set<InstanceConfig> instances =
this.routingTableProvider.getInstances("$terrapin$data$meta_user_join$1411083231",
"72");

System.out.println("Instances : " + instances.size());

I followed the online documentation on how to connect as a spectator here:

http://helix.apache.org/0.6.3-docs/tutorial_spectator.html

Thanks

Varun

Re: SPECTATOR role not returning instances

Posted by Varun Sharma <va...@pinterest.com>.
My bad - I specified the state as part of the call and it worked...

On Fri, Sep 19, 2014 at 1:22 PM, Varun Sharma <va...@pinterest.com> wrote:

> I am trying to get the instance list for a resource and its returning me
> an empty list of instances for the resource. When I look at the external
> view, the partition is online on 3 different hosts.
>
> ,"72":{
>
>       "hdfsterrapin-a-datanode-5b1b2671":"ONLINE"
>
>       ,"hdfsterrapin-a-datanode-911c21bb":"ONLINE"
>
>       ,"hdfsterrapin-a-datanode-fc1d20d6":"ONLINE"
>
>     }
>
> I am using helix 0.6.3 - my resource names contain '$' sign - I have
> verified this to be not a problem for PARTICIPANT and CONTROLLER roles.
> What might be the reason behind this ? Here is my code:
>
> Set<InstanceConfig> instances =
> this.routingTableProvider.getInstances("$terrapin$data$meta_user_join$1411083231",
> "72");
>
> System.out.println("Instances : " + instances.size());
>
> I followed the online documentation on how to connect as a spectator here:
>
> http://helix.apache.org/0.6.3-docs/tutorial_spectator.html
>
> Thanks
>
> Varun
>