ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taras Ledkov <tled...@gridgain.com>
Subject Introduce custom executors for compute grid
Date Tue, 18 Apr 2017 08:23:53 GMT

Custom executor (user's thread pool) is added fro compute grid with 
following semantics:

1. Configuration:

IgniteConfiguration cfg;
     new ExecutorConfiguration().setName("executor0").setSize(2),
     new ExecutorConfiguration().setName("executor1").setSize(4));

name - name of executor and thread pool;
size - thread pool size.

2. Usage:

Ignite ignite;
IgniteCompute comp = ignite.compute().withExecutor("executor0");
comp.broadcast(new IgniteRunnable() {
             @Override public void run() {

So, 'withExecutor(String)' returns the compute associated with custom 
named executor.
All jobs submitted by the components will be processed by thread pool 
corresponds to named executor.
If the executor isn't configured on the target host the warning will be 
printed in the log and a job will be processed in the public pool.

Custom executor 'invalid' doesn't exist. The job will be submit to 
public pool: b2e85208b51-4fbcb569-07a2-480e-9be1-512bc3200000

Issue: https://issues.apache.org/jira/browse/IGNITE-4699

Please share your thoughts or ask questions.

Taras Ledkov
Mail-To: tledkov@gridgain.com

View raw message