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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...