ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Mashenkov <andrey.mashen...@gmail.com>
Subject Re: ScanQuery With BinaryObject
Date Fri, 31 Mar 2017 11:40:08 GMT
Hi David,

Would you please share your code.

On Fri, Mar 31, 2017 at 10:42 AM, David Li <david.li.sg@gmail.com> wrote:

> It is weird.
>
> I run the cache query example, scan query works fine.
>
> I create my cache query code with a local started server node, scan query
> works fine.
>
> I start a server node from terminal, start a client node in my code and
> issue scan query, the first query after the server node is started works
> fine, all the following queries will just return the exactly same result as
> the first query. I try adding data into the cache, the newly added data
> will be returned as per the first query. It looks like the first query has
> been kept somewhere.
>
>
>
>
> On Thu, Mar 30, 2017 at 9:02 PM, Andrey Mashenkov <
> andrey.mashenkov@gmail.com> wrote:
>
>> Hi David,
>>
>> I've run your code and it works fine for me on ignite 1.7-1.9 versions
>> and master branch.
>>
>> On Thu, Mar 30, 2017 at 12:19 PM, David Li <david.li.sg@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am having a little issue with the ScanQuery for BinaryObject.
>>>
>>> Some code snippets
>>>
>>> IgniteCache<Long, Organization> cache = ignite.cache(CacheConfig.CACHE_NAME);
>>> IgniteCache<Long, BinaryObject> binaryCache = cache.withKeepBinary();
>>>
>>> // scan query
>>> IgniteBiPredicate<Long, BinaryObject> filter = new IgniteBiPredicate<Long,
BinaryObject>() {
>>>     @Override
>>>     public boolean apply(Long key, BinaryObject value) {
>>>         return false;
>>>     }
>>> };
>>> ScanQuery<Long, BinaryObject> scanQuery = new ScanQuery<>(filter);
>>>
>>> List<Cache.Entry<Long, BinaryObject>> result = binaryCache.query(scanQuery).getAll();
>>>
>>>
>>> I expect it will return an empty result, somehow it always returns everything
in the cache.
>>>
>>> Not sure what is wrong?
>>>
>>>
>>> BRs,
>>>
>>> David
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Andrey V. Mashenkov
>>
>
>


-- 
Best regards,
Andrey V. Mashenkov

Mime
View raw message