<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Splunk API taking long time through java splunk sdk in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50781#M661</link>
    <description>&lt;P&gt;Thanks Neeraj.&lt;/P&gt;

&lt;P&gt;My main concern is API is taking more time(30 to 40 sec) some times, and sometimes it is very fast(5 to 6 sec).&lt;/P&gt;

&lt;P&gt;In Splunk UI it is very fast,within 2 sec am getting the results.&lt;BR /&gt;
My Java Application will be hitting by multiple users.Is it creating any slowness.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2013 17:08:00 GMT</pubDate>
    <dc:creator>bubby248</dc:creator>
    <dc:date>2013-03-07T17:08:00Z</dc:date>
    <item>
      <title>Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50772#M652</link>
      <description>&lt;P&gt;Hi &lt;BR /&gt;
I am using saved searches to retrieve the results from Splunk.However after indexing, the data in Splunk web UI is faster, but the api response from java sdk is still slow.&lt;BR /&gt;
Can you guys help me out regarding this.&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Harsha&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 23:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50772#M652</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-04T23:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50773#M653</link>
      <description>&lt;P&gt;The SDK doesn't add any extra overhead and the response time should be very similar to the Splunk UI. You mentioned that you are using saved searches to pull data from Splunk. Is the saved search scheduled? If so, you should use the history function on the saved search object to retrieve the last run instance. That should be speed things up hopefully.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 23:26:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50773#M653</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-03-04T23:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50774#M654</link>
      <description>&lt;P&gt;No my saved searches are not scheduled.Is there anyway I can get faster response without scheduling saved searches.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 00:33:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50774#M654</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-05T00:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50775#M655</link>
      <description>&lt;P&gt;No my saved searches are not scheduled.Is there anyway I can get faster response without scheduling saved searches.&lt;BR /&gt;
(20 secs ago)bubby248&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 00:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50775#M655</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-05T00:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50776#M656</link>
      <description>&lt;P&gt;Hi Neeraj &lt;/P&gt;

&lt;P&gt;In my java code am using in below format&lt;BR /&gt;
Service.getJobs().create("mysavedsearch"',inputargs)&lt;BR /&gt;
From above am retreiving the job details .Is this approach is a good one.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 01:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50776#M656</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-05T01:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50777#M657</link>
      <description>&lt;P&gt;This should work. Another way to approach this would be to create/save the search on the server and then dispatch it as follows to get a handle on the Job. With this approach, you can decide to schedule it in the fure and then use the history method for faster returns.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SavedSearch ss = service.getSavedSearches().get("my_saved_search");
Job job = ss.dispatch();
while (!job.isReady()) {
    Thread.sleep(1000);
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Mar 2013 09:47:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50777#M657</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-03-06T09:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50778#M658</link>
      <description>&lt;P&gt;Thanks Neeraj&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2013 22:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50778#M658</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-06T22:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50779#M659</link>
      <description>&lt;P&gt;Service.getJobs().create("mysavedsearch"',inputargs)&lt;/P&gt;

&lt;P&gt;Here am just retreiving the savedsearch right.Am I creating any new saved searches on the server.I just need to retreive it&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2013 23:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50779#M659</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-06T23:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50780#M660</link>
      <description>&lt;P&gt;No, this will also work. You are doing the same thing, creating a job from a saved search.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2013 10:38:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50780#M660</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-03-07T10:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50781#M661</link>
      <description>&lt;P&gt;Thanks Neeraj.&lt;/P&gt;

&lt;P&gt;My main concern is API is taking more time(30 to 40 sec) some times, and sometimes it is very fast(5 to 6 sec).&lt;/P&gt;

&lt;P&gt;In Splunk UI it is very fast,within 2 sec am getting the results.&lt;BR /&gt;
My Java Application will be hitting by multiple users.Is it creating any slowness.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2013 17:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50781#M661</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-07T17:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50782#M662</link>
      <description>&lt;P&gt;Below is the code am using from java&lt;BR /&gt;
Job job =null;&lt;BR /&gt;
Map&lt;STRING&gt; inputArgs = new HashMap&lt;STRING&gt;();&lt;BR /&gt;
inputArgs.put("ttl",30);&lt;BR /&gt;
job = service.getJobs().create("|savedsearch mysavedsearch earliest=-1440m@m latest=now span=1hr",inputArgs);&lt;BR /&gt;
 while (!job.isDone()) &lt;BR /&gt;
     {try   Thread.sleep(2000);}catch    (InterruptedException e) {}&lt;BR /&gt;
job.refresh();&lt;BR /&gt;&lt;BR /&gt;
 } Map&lt;STRING&gt; outputArgs = new HashMap&lt;STRING&gt;();          outputArgs.put("count",0);//To get more than 100 results&lt;BR /&gt;
outputArgs.put("output_mode","json");             InputStream stream = job.getResults(outputArgs);&lt;/STRING&gt;&lt;/STRING&gt;&lt;/STRING&gt;&lt;/STRING&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2013 17:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50782#M662</guid>
      <dc:creator>bubby248</dc:creator>
      <dc:date>2013-03-07T17:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50783#M663</link>
      <description>&lt;P&gt;Shouldn't be any difference.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2013 23:19:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50783#M663</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-03-11T23:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50784#M664</link>
      <description>&lt;P&gt;How big is the index you search? &lt;/P&gt;

&lt;P&gt;I have noticed that searching an index of size 1m events if I did not limit the results with &lt;CODE&gt;| head 50000&lt;/CODE&gt; (could be other value es well, I used this to be in sync with the REST API result limit in limits.conf) Splunk will search through all 1m event and then return 50000 (as it is configured in limits.conf)&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 20:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50784#M664</guid>
      <dc:creator>andras_kerekes</dc:creator>
      <dc:date>2013-06-27T20:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API taking long time through java splunk sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50785#M665</link>
      <description>&lt;P&gt;even i am facing this issue. please help. i see the search getting completed on splunk UI but not through java client. &lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2014 01:44:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-API-taking-long-time-through-java-splunk-sdk/m-p/50785#M665</guid>
      <dc:creator>kicksammy</dc:creator>
      <dc:date>2014-11-26T01:44:38Z</dc:date>
    </item>
  </channel>
</rss>

