Amit, >> But I don't know which regions has the data.
The data aware function routing is supported using the region name and keys...In your case, since you don't know the region, you have to execute the function on all nodes and identify the region. Just curious, how are injecting data into the regions? can you identify the region names using keys? -Anil. On Wed, Dec 14, 2016 at 9:39 AM, Amit Pandey <[email protected]> wrote: > hey Anil, > > Thanks. My case is data dependent. But I don't know which regions has the > data. But I would like the code to go and execute to the node where it is > located. > > I see this in that doc :- "* a region—*If you are executing a > data-dependent function, specify a region and, optionally, a set of keys on > which to run the function. The method FunctionService.onRegion() directs > a data-dependent function to execute on a specific region." > > So does it mean if I specify a set of keys, the code will be executed at > the place where the data is located? > > Regards > > On Wed, Dec 14, 2016 at 10:49 PM, Anilkumar Gingade <[email protected]> > wrote: > >> Amit, >> >> Yes, it does what you are looking for... >> >> You can find more about function execution at: >> http://geode.apache.org/docs/guide/developing/function_exec/ >> how_function_execution_works.html >> >> If you have further question don't hesitate to ask. >> >> -Anil. >> >> >> >> On Wed, Dec 14, 2016 at 9:04 AM, Amit Pandey <[email protected]> >> wrote: >> >>> Hey All, >>> >>> I want to know does Geode functions execute on collocated data. My >>> usecase is that I have portioned cache and I want to do some computations >>> in parallel in all the nodes. >>> >>> Now does Geode automatically distribute functions so that the code only >>> works on data in a particular node? >>> >>> Or is there mechanism to do so? >>> >>> I think an example will make it clear. Lets say I have some stocks and >>> their prices in a cache. Now I want to do some calculations , so can I >>> redirect code to be executed on the node holding the data for Pivotal stock >>> automatically? >>> >> >> >
