我的geode客户端正在努力保留并检索特定区域中的数据。
ClientRegionFactoryBean<Integer, Book> region =
new ClientRegionFactoryBean<>();
region.setName("Book");
region.setPool(gemfirePool);
region.setCache(cache.getObject());
region.setShortcut(ClientRegionShortcut.PROXY);
但是,如果我尝试使用该区域来查询其他区域,则不允许我这样做:
org.apache.geode.cache.query.QueryInvalidException: Should not execute region.query with a different region in the from clause: Book was not present in:select * from /Staff
任何想法?
答案 0 :(得分:1)
您应该从ClientCache获取QueryService
即clientCache.getQueryService();
而不是region.query();