Splunk Dev

Java SDK - How to Save a Job

cbauza
Engager

I am running a Job and retrieving datas over 1 Gb.

What happpens is that the job expires before I have time to load all the datas.

Is there a way to save the job using the API or increase the time before the job expires ?

Tags (3)
0 Karma

ziegfried
Influencer

You can use the job.touch() method to keep the job alive for the given ttl (time to live) or modify the ttl by using job.setttl(<ttl in seconds>).

"Touching" the job every few thousand events might be a good idea. Additionally, using job.cancel()when you've finished processing the results can be used to remove the job.

job.setttl(86400);
processEvents(job);
job.cancel();

ineeman
Splunk Employee
Splunk Employee
Get Updates on the Splunk Community!

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

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

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...

4 Ways the Splunk Community Helps You Prepare for .conf25

.conf25 is right around the corner, and whether you’re a first-time attendee or a seasoned Splunker, the ...