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

Path Finder


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

while (!myJob.isDone()) {
try {
} catch (InterruptedException e) {

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)


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

See this post:

0 Karma
Get Updates on the Splunk Community!

New Learning Videos on Topics Most Requested by You! Plus This Month’s New Splunk ...

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...

How I Instrumented a Rust Application Without Knowing Rust

As a technical writer, I often have to edit or create code snippets for Splunk's distributions of ...

Splunk Community Platform Survey

Hey Splunk Community, Starting today, the community platform may prompt you to participate in a survey. The ...