>
> In Apache Ignite, you can execute colocated computations by specifying a
>> job target that directs the task to run on the node holding the required
>> data.
>>
>
> But a single node holds multiple partitions of a given table, so if you
> run a ComputeJob on the targeted node for a given table, it iterates over
> all the parititions it holds during a IgniteTables.query(), correct?
>

There are two types of compute with regard of partitioned data - colocated
and partitioned.
Colocated (JobTarget.colocated()) means that a single job will be executed
on a node that holds a data for the specified key.
Partitioned (BroadcastJobTarget.table()) will execute a job per partition,
so if a node holds multiple partitions, multiple jobs will be executed on
that node.

In order to get the corresponding data using SQL, you will have to use
system column. In the Ignite 3.1 it's called "__PART", see
https://ignite.apache.org/docs/ignite3/latest/developers-guide/sql/sql-api#partition-specific-selects
Please note that in the next major Ignite version it's renamed to
"__PARTITION_ID" and "__PART" is deprecated.

Let me know if this was helpful.
Thanks,
Vadim

Reply via email to