You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@helix.apache.org by Lance Co Ting Keh <la...@box.com> on 2013/07/08 22:06:47 UTC

ZkHelixAdmin getResourceExternalView

Hi guys,

Quick question on ZKHelixAdmin's getResourceExternalView, and other method
calls for information in Zookeeper. I checked the code base and it seems
that for every call we go to Zookeeper to get the info. I just want to make
sure that I am right on this. Is nothing cached in the participant's
memory? If so and i want to make an extra health check from the non-JVM
participant to make sure the non-JVM participant how can I best do this
without overloading Zookeeper?


Sincerely,
Lance

Re: ZkHelixAdmin getResourceExternalView

Posted by Lance Co Ting Keh <la...@box.com>.
Hi Kishore,

I would love to do so. I am rushing to finish something for Box right now
but I'll look to do it before I go back/right when i go back to school.


Thank you
Lance


On Mon, Jul 8, 2013 at 3:24 PM, kishore g <g....@gmail.com> wrote:

> Hi Lance,
>
> Look at the Routing table provider code, it sets up a watch on the
> external view and updates the local cache on demand. You can do similar
> stuff on LiveInstance as well.
>
> There is a generic class called ZKCachedDataAccessor which keeps local
> cache for a path and updates the cache only when something changes. It is
> fairly low level, it will be nice to have a high level api to satisfy your
> requirement. Let me know if you want to file a JIRA and contribute it.
>
> thanks,
> Kishore G
>
>
> On Mon, Jul 8, 2013 at 1:06 PM, Lance Co Ting Keh <la...@box.com> wrote:
>
>> Hi guys,
>>
>> Quick question on ZKHelixAdmin's getResourceExternalView, and other
>> method calls for information in Zookeeper. I checked the code base and it
>> seems that for every call we go to Zookeeper to get the info. I just want
>> to make sure that I am right on this. Is nothing cached in the
>> participant's memory? If so and i want to make an extra health check from
>> the non-JVM participant to make sure the non-JVM participant how can I best
>> do this without overloading Zookeeper?
>>
>>
>> Sincerely,
>> Lance
>>
>
>

Re: ZkHelixAdmin getResourceExternalView

Posted by kishore g <g....@gmail.com>.
Hi Lance,

Look at the Routing table provider code, it sets up a watch on the external
view and updates the local cache on demand. You can do similar stuff on
LiveInstance as well.

There is a generic class called ZKCachedDataAccessor which keeps local
cache for a path and updates the cache only when something changes. It is
fairly low level, it will be nice to have a high level api to satisfy your
requirement. Let me know if you want to file a JIRA and contribute it.

thanks,
Kishore G


On Mon, Jul 8, 2013 at 1:06 PM, Lance Co Ting Keh <la...@box.com> wrote:

> Hi guys,
>
> Quick question on ZKHelixAdmin's getResourceExternalView, and other method
> calls for information in Zookeeper. I checked the code base and it seems
> that for every call we go to Zookeeper to get the info. I just want to make
> sure that I am right on this. Is nothing cached in the participant's
> memory? If so and i want to make an extra health check from the non-JVM
> participant to make sure the non-JVM participant how can I best do this
> without overloading Zookeeper?
>
>
> Sincerely,
> Lance
>