Hi,

Yes, you need to use ScanQuery[1] over partition (look at the
setPartition(int)[1] method). The query will be iterate over entry in a
particular partition.

To aware which partitions are storing in local node, use the code snippet:

Affinity aff = ignite.affinity(cacheName);
ClusterNode locNode = ignite.cluster().localNode();
int[] parts = aff.primaryPartitions(locNode);

[1]: https://apacheignite.readme.io/docs/cache-queries#scan-queries
[2]:
https://ignite.apache.org/releases/mobile/org/apache/ignite/cache/query/ScanQuery.html#setPartition(java.lang.Integer)

On Fri, Sep 9, 2016 at 10:15 AM, Yitzhak Molko <[email protected]>
wrote:

> Is it possible to iterate through all key values on primary partition of
> the node on this node?
>
> Thanks,
> Yitzhak
>
> On Fri, Sep 9, 2016, 02:28 vkulichenko <[email protected]>
> wrote:
>
>> IgniteCache is Iterable, so you can just iterate through its contents.
>>
>> -Val
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.
>> 70518.x6.nabble.com/how-to-get-all-keys-and-values-
>> stored-into-ignite-cache-for-ignite1-6-tp7612p7615.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
> --
>
> Yitzhak Molko
>



-- 
Vladislav Pyatkov

Reply via email to