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 
September 24, 2021, 02:27:14 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: Please help me, Set Broadcast For Job work not correctly  (Read 949 times)

kidmtt94

  • JPPF Knight
  • **
  • Posts: 15
Please help me, Set Broadcast For Job work not correctly
« on: August 20, 2018, 01:04:47 PM »

Hi admin,

I set broadcast for my job like following code:

JPPFJob job = new JPPFJob();
job.setBlocking(false);
job.getSLA().setCancelUponClientDisconnect(false);
job.getSLA().setBroadcastJob(isBroadCast);

After submitting job, it often can not dispatch jobs to nodes, just sometimes work correctly (it work correctly after restart server). But on UI i appear some strange thing. I had attached image for this problems.
Please help me to review this.
I make sure use all default configuration
Thanks
« Last Edit: August 20, 2018, 03:30:06 PM by kidmtt94 »
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Re: Please help me, Set Broadcast For Job work not correctly
« Reply #1 on: August 21, 2018, 08:42:54 AM »

Hello,

The behavior you observe is registered as a bug: JPPF-544 Wrong handling of broadcast job monitoring. We are working on it and will provide a patch when it is fixed.

Regarding the fact that the job is not dispatched to the nodes, could you please have a look a the server and nodes logs and let us know if there is any relavant exception or error there. In particular, there may be one or more ClassNotFoundException in the nodes. This could be due to the fact that your job is non-blocking and that you may be closing the client before the job is dispatched to the nodes, thus preventing the node distributed class loader from working.

To check this, you can also try to set the job as blocking and verify if it actually gets dispatched to the nodes.

Thanks,
-Laurent
Logged

kidmtt94

  • JPPF Knight
  • **
  • Posts: 15
Re: Please help me, Set Broadcast For Job work not correctly
« Reply #2 on: August 22, 2018, 10:48:20 AM »

Hi Laurent,
I don't need to wait result of jobs, because we just submit and kill that process submitting. So broadcast don't work normally.
Do u have any solution for us ?  :)
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Re: Please help me, Set Broadcast For Job work not correctly
« Reply #3 on: August 23, 2018, 07:47:07 AM »

Hi,

The problem may be due to the fact that the client process is killed too soon and the JPPF client doesn't have time to send the job to the server.
If this is the problem, then a possible solution is to wait until the job is dispatched to the server, and then kill the client process. An easy way to do this, is to use a job listener associated with a synchronization aid such as a CountDownLatch:

Code: [Select]
JPPFJob job = new JPPFJob();
job.setName("broadcast");
job.add(new MyTask(10_000L));
job.setBlocking(false);
job.getSLA().setBroadcastJob(true);
job.getSLA().setCancelUponClientDisconnect(false);
final CountDownLatch latch = new CountDownLatch(1);
// a job listener that notifies when the job is dispatched to the server
job.addJobListener(new JobListenerAdapter() {
  @Override
  public void jobDispatched(JobEvent event) {
    latch.countDown();
  }
});
client.submitJob(job);
// wait until the job has been dispatched
latch.await();
// kill this client
System.exit(0);

Could you please try this andf let us know if that fixes the problem?

Additionally, I have fixed the issue with the display of broadcast jobs in the admin console (JPPF-544) and the fix is now available in patch 02 for JPPF 5.2.9.

-Laurent
Logged

kidmtt94

  • JPPF Knight
  • **
  • Posts: 15
Re: Please help me, Set Broadcast For Job work not correctly
« Reply #4 on: August 23, 2018, 11:54:31 AM »

Your solution is ok. I had tried it :D.
Thanks for your hard-working.
But it still has one problem. After you kill process, and then you create new process to submit with broadcast, if a job of old process has done executed, I don't know why all jobs of old and new process is cancel :D
So I decided to choose solution don't kill process and setBlocking(true).

Many thanks Laurent.
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