JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
November 13, 2019, 01:19:53 PM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: Questions about local execution mode  (Read 27 times)

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Questions about local execution mode
« on: August 16, 2019, 05:33:27 PM »

Hi Laurent, I have some questions around local execution:

  • How do you retrieve the list of jppf jobs that are currently queued? I can't seem to find a way to get the JobStatusManager, to then get the job uuids, and then the JobInformation
  • Are execution priorities (JobSLA) honored in local execution mode?
  • How can I get diagnostic information when using local execution? For example, current executing/queued job/tasks
  • Is the jppf.local.execution.threads property setting directly related to the number of jobs that can be submitted, backed by an unbounded queue on the thread pool?
    I know in remote mode this is controlled by <driver>.jppf.pool.size property and above this value jobs will be queued. I'm not sure in local execution what happens.

Thank you in advance,

CM
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
Re: Questions about local execution mode
« Reply #1 on: August 18, 2019, 07:58:28 AM »

Hello CM,

To answer your questions:

1. How do you retrieve the list of jppf jobs that are currently queued?

Currently the only documented and publicly exposed way is to register a ClientQueueListener with the JPPFClient. For example:
Code: [Select]
JPPFClient client = ...;
client.addClientQueueListener(new ClientQueueListener() {
  @Override
  public void jobAdded(ClientQueueEvent event) {
    List<JPPFJob> jobs = event.getQueuedJobs();
    // do something with the list ...
  }

  @Override
  public void jobRemoved(ClientQueueEvent event) {
    ...
  }
});

However, it seems like a good idea to have a direct API available from the JPPFClient. To this effect, I registered the enhancement JPPF-601 Add a client API to list the queued jobs in a JPPF client, which will be part of the upcoming 6.0.4, 6.1.2 and 6.2 releases.

2. Are execution priorities (JobSLA) honored in local execution mode?

Yes. No matter the execution channel for a job, be it local or remote, the jobs are taken from the client queue, which is ordered by job priorities obtained from JPPFJob.getSLA().getPriority().

3. How can I get diagnostic information when using local execution?

In addition to the ClientQueueListener mentioned above, you can listen to notfications from the tasks. By default, JPPF sends a notification upon completion of each task, but you can also send your own notifications. To receive these notifications, you need to register a TaskExecutionListener. When using this mechanism with a local client executor, please be aware that:
- even though the TaskExecutionListener is documented for the nodes, it also works with clients
- there is no direct API to register a TaskExecutionListener, this must be done via the SPI (Service Provider Interface) mechanism
- when sending notifications from a locally executing task, the sendViaJmx parameter of the call to Task.sendNotification(userObject, sendViaJmx) is ignored.

You can also adjust the logging settings to obtain very detailed information about the execution of the tasks, by adding the following in log4j-client.properties:
Code: [Select]
log4j.logger.org.jppf.execute=TRACE
4. Is the jppf.local.execution.threads property setting directly related to the number of jobs that can be submitted, backed by an unbounded queue on the thread pool?

No, the number of local threads is completely unrelated to the number of jobs that can be submitted. The client-local executor can only process one job at a time. This is still true in v6.1+, where the number of jobs that can be sent concurrently to the driver is no longer limited by the number of client-to-driver connections (i.e. a single connection can handle any number of concurrent jbs).

I hope this answers your questions to your satisfaction.

Sincerely,
-Laurent
Logged

codemonkey

  • JPPF Council Member
  • *****
  • Posts: 138
Re: Questions about local execution mode
« Reply #2 on: August 19, 2019, 10:53:15 PM »

Thanks Laurent for taking the time to write these detailed answers, very helpful.

CM

Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads