The end answer was that one needs to specify the Spring GemFire annotation 
@OnRegion. If not, you get the results behind the original email.  It seems 
that what seems obvious from using plain Geode with its many examples is not so 
obvious when using Spring GemFire with its different syntax and few examples. 
There were no examples of this in the training that I saw and no examples in 
the distribution nor of this syntax in the Spring GemFire advanced examples.

The world needs an advanced training class using Geode with Spring GemFire.
@OnRegion(region="someRegion", resultCollector="myCollector")
public interface FunctionExecution {
     @FunctionId("function1")

Thanks,
Wes
A slide from the GemFire Developer class on queries within a function. The
key is that when executing the function, you pass in the
RegionFunctionContext which helps the query executor focus solely on region
data on the same Cache Server instance.
[image: Inline image 1]
If I remember correctly, this was leverages from one of the examples in the
sample code delivered with the Geode (or GemFire) installation.

On Tue, Nov 17, 2015 at 4:49 PM, Barry Oglesby <[email protected]> wrote:

> Wes,
>
> Attached is an example that loads colocated partitioned regions with
> customers and orders and uses a function to execute a join query against
> them.
>
> It has a readme that describes how to run it. Let me know if you have any
> issues.
>
> Thanks,
>
> Barry Oglesby
> GemFire Advanced Customer Engineering (ACE)
> For immediate support please contact Pivotal Support at
> http://support.pivotal.io/
>
>
> On Tue, Nov 17, 2015 at 2:32 PM, Real Wes Williams <[email protected]
> > wrote:
>
>>
>> Hi team,
>>
>> Executing a join query inside a function is returning an error for a
>> reason that it should not.  The error message says that a join won't work
>> unless it’s inside a function. But I AM inside a function! Need some
>> guidance. I'm not even doing anything with the second region. It's just
>> defined. How can I get a proper join to work if both are partitioned?
>>
>> [error 2015/11/17 16:46:10.627 EST server1 <**Function Execution** 
>> Processor1>
>> tid=0x45] Function search-inventory-function:
>>   java.lang.UnsupportedOperationException: A query on a Partitioned
>> Region ( Instruments ) may not reference any other region if query is NOT
>> executed within a Function
>>
>> *SELECT p.instrumentId FROM /Prices p, /Instruments;*
>>
>> Both are partitioned. Both are colocated on instrumentId. The query is
>> being executed inside of a function.onRegion(…).
>>
>> How can I get a proper join to work if both are partitioned? I thought
>> this was supported.
>>
>> Thanks,
>> Wes
>>
>
>


-- 

*Mark Secrist | Sr Manager, **Global Education Delivery*

[email protected]

970.214.4567 Mobile

  *pivotal.io <http://www.pivotal.io/>*

Follow Us: Twitter <http://www.twitter.com/pivotal> | LinkedIn
<http://www.linkedin.com/company/pivotalsoftware> | Facebook
<http://www.facebook.com/pivotalsoftware> | YouTube
<http://www.youtube.com/gopivotal> | Google+
<https://plus.google.com/105320112436428794490>

Reply via email to