All Apps and Add-ons

Splunk OneshotSearch takes more time in Java SDK

spadhi
Engager

Hi
I have a requirement, whereI have to call Splunk search queries using java SDK.
I am using service.oneshotSearch(searchQuery, oneshotSearchArgs);
and ResultsReaderJson to read the json data.
However it takes more than 5 minutes to get the data from Splunk and it takes 10 sec to retrieve the data using splunk UI.
My search query returns around 90 records as result.
Can you please help me here to understand whats wrong?
Sample code
Args oneshotSearchArgs = new Args();
oneshotSearchArgs.put(SearchMode.OUTPUT_MODE.getMode(), OutputMode.JSON);
oneshotSearchArgs.put("count", 0);
inputstream is = service.oneshotSearch("myquery here", oneshotSearchArgs);
//this line takes morethan 5 minutes to execute
ResultsReaderJson resultsReader = new ResultsReaderJson(run);

Appreciate a quick help here.

Tags (2)
0 Karma

santhoshpriyan
New Member

Hi spadhi,

I am also facing the same issue, did any solution resolved this? if so please help me.

Thanks,
Santhoshpriyan
santhoshpriyan@gmail.com

0 Karma
Get Updates on the Splunk Community!

New This Month in Splunk Observability Cloud - Metrics Usage Analytics, Enhanced K8s ...

The latest enhancements across the Splunk Observability portfolio deliver greater flexibility, better data and ...

Alerting Best Practices: How to Create Good Detectors

At their best, detectors and the alerts they trigger notify teams when applications aren’t performing as ...

Discover Powerful New Features in Splunk Cloud Platform: Enhanced Analytics, ...

Hey Splunky people! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2408. In this ...