0

Is there a way, how I can remove not RUNNING jobs from my hazelcastInstance?

I have stream from jetInstance.getJobs() and I need to return Map<String, Object>, where key is the name of job. But it is not possible, since I already stopped and re-run some jobs - there are more instances with the same name.

I was not able to find any possible solution for my case except for removing finished ones.

I am not sure, if it is even possible. Thank you for some solution or hints.

Oliv
  • 10,221
  • 3
  • 55
  • 76
Daniel Perník
  • 5,464
  • 2
  • 38
  • 46

1 Answers1

0

Job name is not required to be unique. If you need to distinguish jobs, use Job.getId(). Or, if you re-submit jobs, use different name. This is by design, name is just a tag, not an identifier.

Oliv
  • 10,221
  • 3
  • 55
  • 76
  • Yes, I know. But job names are only thing I know. They are well known through app lifecycle. I am just trying not to change design. I will be probably forced to use multimap and iterate more... – Daniel Perník Jul 11 '18 at 07:44