<?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 After starting an export job using the Java SDK, is it possible to forcefully time out the connection? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157486#M31906</link>
    <description>&lt;P&gt;We came across the following issue in production: after starting an export job and receiving a few hundred thousands of events back, the export job stopped returning any more events, yet the connection was still open, and we did not get any exceptions (the API call was blocked waiting on more events). Basically, the program was hanging waiting to read more events from the ResultsReader (we're using the Java API).&lt;/P&gt;

&lt;P&gt;Unfortunately this case is quite difficult to reproduce. However, we still want to avoid something like this happening in the future. Is there a way to forcefully timeout the connection in case no more events were being received via the ResultsReader? There is a "setAutoCancel" call for the JobExportArgs API (&lt;A href="http://docs.splunk.com/DocumentationStatic/JavaSDK/1.4.0/index.html?com/splunk/JobExportArgs.html"&gt;http://docs.splunk.com/DocumentationStatic/JavaSDK/1.4.0/index.html?com/splunk/JobExportArgs.html&lt;/A&gt;), though it is somewhat confusing because the docs say that an export search does &lt;EM&gt;not&lt;/EM&gt; create a new job on the Splunk server:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/java-sdk/SP-CAAAEHQ"&gt;http://dev.splunk.com/view/java-sdk/SP-CAAAEHQ&lt;/A&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Export: An export search runs immediately, does not create a job for the search, and starts streaming results immediately. This search is useful for exporting large amounts of data from Splunk Enterprise.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Right now, one course of action is to implement a timeout mechanism on our side, and forcefully restart the search query. Is there a better way?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jun 2015 21:12:54 GMT</pubDate>
    <dc:creator>mexa</dc:creator>
    <dc:date>2015-06-15T21:12:54Z</dc:date>
    <item>
      <title>After starting an export job using the Java SDK, is it possible to forcefully time out the connection?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157486#M31906</link>
      <description>&lt;P&gt;We came across the following issue in production: after starting an export job and receiving a few hundred thousands of events back, the export job stopped returning any more events, yet the connection was still open, and we did not get any exceptions (the API call was blocked waiting on more events). Basically, the program was hanging waiting to read more events from the ResultsReader (we're using the Java API).&lt;/P&gt;

&lt;P&gt;Unfortunately this case is quite difficult to reproduce. However, we still want to avoid something like this happening in the future. Is there a way to forcefully timeout the connection in case no more events were being received via the ResultsReader? There is a "setAutoCancel" call for the JobExportArgs API (&lt;A href="http://docs.splunk.com/DocumentationStatic/JavaSDK/1.4.0/index.html?com/splunk/JobExportArgs.html"&gt;http://docs.splunk.com/DocumentationStatic/JavaSDK/1.4.0/index.html?com/splunk/JobExportArgs.html&lt;/A&gt;), though it is somewhat confusing because the docs say that an export search does &lt;EM&gt;not&lt;/EM&gt; create a new job on the Splunk server:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/java-sdk/SP-CAAAEHQ"&gt;http://dev.splunk.com/view/java-sdk/SP-CAAAEHQ&lt;/A&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Export: An export search runs immediately, does not create a job for the search, and starts streaming results immediately. This search is useful for exporting large amounts of data from Splunk Enterprise.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Right now, one course of action is to implement a timeout mechanism on our side, and forcefully restart the search query. Is there a better way?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2015 21:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157486#M31906</guid>
      <dc:creator>mexa</dc:creator>
      <dc:date>2015-06-15T21:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: After starting an export job using the Java SDK, is it possible to forcefully time out the connection?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157487#M31907</link>
      <description>&lt;P&gt;The &lt;STRONG&gt;auto_cancel&lt;/STRONG&gt; request parameter should solve your use case. By default it is 0 , but you could change it to a value to specify that the export is cancelled after (n) seconds of inactivity.&lt;/P&gt;

&lt;P&gt;This parameter is available for export searches as per the REST API docs.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/RESTREF/RESTsearch#search.2Fjobs.2Fexport"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/RESTREF/RESTsearch#search.2Fjobs.2Fexport&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/388i584C93493FC30622/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 03:17:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157487#M31907</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2015-06-16T03:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: After starting an export job using the Java SDK, is it possible to forcefully time out the connection?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157488#M31908</link>
      <description>&lt;P&gt;Thanks Damien, we're going to use this parameter from now on.&lt;/P&gt;

&lt;P&gt;Any idea though why this may happen in production (just hanging without fetching any results, after already having fetched some subset of records)?&lt;/P&gt;

&lt;P&gt;Also, once this timeout is reached, I presume we're going to get some sort of timeout exception in the code, correct?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2015 18:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157488#M31908</guid>
      <dc:creator>mexa</dc:creator>
      <dc:date>2015-06-18T18:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: After starting an export job using the Java SDK, is it possible to forcefully time out the connection?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157489#M31909</link>
      <description>&lt;P&gt;I tested with a small value for &lt;STRONG&gt;auto_cancel&lt;/STRONG&gt; (a couple of seconds), but we see a similar behavior. The search returns some results, but then we block forever on the socket read call (&lt;STRONG&gt;reader.getNextEvent()&lt;/STRONG&gt;), never timing out.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2015 19:59:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157489#M31909</guid>
      <dc:creator>mexa</dc:creator>
      <dc:date>2015-06-18T19:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: After starting an export job using the Java SDK, is it possible to forcefully time out the connection?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157490#M31910</link>
      <description>&lt;P&gt;I'm having similar problems, did you ever get a solution to this?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 17:13:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157490#M31910</guid>
      <dc:creator>conklirb</dc:creator>
      <dc:date>2019-04-08T17:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: After starting an export job using the Java SDK, is it possible to forcefully time out the connection?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157491#M31911</link>
      <description>&lt;P&gt;I'm having a similar issue, did you ever get this resolved?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 17:14:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157491#M31911</guid>
      <dc:creator>conklirb</dc:creator>
      <dc:date>2019-04-08T17:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: After starting an export job using the Java SDK, is it possible to forcefully time out the connection?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157492#M31912</link>
      <description>&lt;P&gt;@conklirb This thread is almost four years old.  If the solution offered does not help you, then you should post a new question describing your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:37:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-starting-an-export-job-using-the-Java-SDK-is-it-possible/m-p/157492#M31912</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-04-08T18:37:15Z</dc:date>
    </item>
  </channel>
</rss>

