<?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>question Re: Sparklyr job hang in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Sparklyr-job-hang/m-p/414233#M255218</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/156910"&gt;@intersoldi&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our Spark experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/114383"&gt;@vafs&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/22324"&gt;@Bharati&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/67146"&gt;@jagadeesan&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jun 2026 03:15:51 GMT</pubDate>
    <dc:creator>DianaTorres</dc:creator>
    <dc:date>2026-06-13T03:15:51Z</dc:date>
    <item>
      <title>Sparklyr job hang</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sparklyr-job-hang/m-p/414228#M255214</link>
      <description>&lt;P&gt;We are running a sparkly job that runs queries on cloudera CDP hive cluster. The job sometimes stops before a dbwriteTable function, doing nothing and running indefinitely. The job doesn't always stop in the same point, but always during this trywrite function invocation, not catching any error:&lt;/P&gt;&lt;PRE&gt;trywrite = function(sc, new_name, df, log_obj, wait_sec = 600, max_wait = 3600) 
{
    start_time = Sys.time()
    while (difftime(Sys.time(), start_time, units = 'secs') &amp;lt;= max_wait) {
    print(paste0('Attempt to write table: ', new_name, ' - ', Sys.time()))
    # Connection is valid?
    if (!DBI::dbIsValid(sc)) {
        error(log_obj, paste0('Connection not valid during write table: ', new_name))
        stop(paste0('Failed to write table: ', new_name))
    }   
    tryCatch({
        print(paste0('Writing table: ', new_name))
        result = DBI::dbWriteTable(sc, new_name, df)
        print(paste0('Write completed table: ', new_name, ' - ', Sys.time()))
        return(result)
    }, error = function(e) {
        error(log_obj, paste0('Connection not valid during write table: ', new_name, ' - ', Sys.time()))
        print(paste0('Error message: ', e$message))
        print(paste0('Retrying in', wait_sec, ' seconds: ', Sys.time()))
        Sys.sleep(wait_sec)
    })
}
stop(paste0('Failed to write table before max time: ', new_name))
}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 10:48:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sparklyr-job-hang/m-p/414228#M255214</guid>
      <dc:creator>intersoldi</dc:creator>
      <dc:date>2026-06-11T10:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sparklyr job hang</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sparklyr-job-hang/m-p/414233#M255218</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/156910"&gt;@intersoldi&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our Spark experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/114383"&gt;@vafs&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/22324"&gt;@Bharati&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/67146"&gt;@jagadeesan&lt;/a&gt;&amp;nbsp; who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2026 03:15:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sparklyr-job-hang/m-p/414233#M255218</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2026-06-13T03:15:51Z</dc:date>
    </item>
  </channel>
</rss>

