Reporting

Splunk Java SDK : Why does job.isDone(..) hang forever, but the job inspector in Splunk Web shows the job is done?

splunkears
Path Finder

Hello,

I'm using Splunk Java SDK. Something like the following:

...
...
while (!myJob.isDone()) {
try {
            Thread.sleep(500);
} catch (InterruptedException e) {
               e.printStackTrace();
}
}

My search query takes a long time and hangs forever at myJob.isDone()
But, when I inspect the job by going to Splunk Web's job inspector, I see the job is already done.
Can you help if something wrong with what I'm doing? or is this a known issue with Splunk 6?

Tags (4)

dwtung
Explorer

I had the same issue. Adding job.refresh() in the while !job.isDone() loop fixed it.

See this post: https://answers.splunk.com/answers/221239/splunk-java-api-why-a-job-object-savedsearchdispat.html

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...