Getting Data In

Why ResultsReaderJson taking more time to parse a simple stream returned by oneshotsearch?

santhoshpriyan
New Member

I am having an issue with consuming results using splunk API.

I am using a oneshotsearch where the result is returned immediately less than a second and using ResultrenderJson for parsing and it takes for almost 20 - 30 seconds for 3 results .

Sometimes if search a block of records for 1 day and it contains only 600~ records it will parse for hours and the search will only take 2 seconds.

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 more than time to execute
ResultsReaderJson resultsReader = new ResultsReaderJson(run);

Any Help would be greatly Appreciated.

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...