Jaime de Roque Martínez created SPARK-26157:
-----------------------------------------------

             Summary: Asynchronous execution of stored procedure
                 Key: SPARK-26157
                 URL: https://issues.apache.org/jira/browse/SPARK-26157
             Project: Spark
          Issue Type: Bug
          Components: Spark Submit
    Affects Versions: 2.3.0
            Reporter: Jaime de Roque Martínez


I am executing a jar file with spark-submit.

This jar file is a scala program, which combines operations spark-related and 
non-spark-related.

The issue comes when I execute a stored procedure from scala using jdbc. This 
SP is in a Microsoft SQL database and, basically, performs some operations and 
populates a table with about 500 rows, one by one.

Then, the next step in the program is read that table and perform some 
additional calculations. This step is taking always less rows than created by 
stored procedure, but this is because this step is not properly sync with the 
previous one, starting its execution without waiting the previous step to be 
done.

I have tried:
 * Insert a Thread.sleep(10000) between both instructions and{color:#14892c} it 
seems to work{color}.

 * Execute the program just with one Executor => {color:#d04437}it doesn't 
work{color}.

I would like to know why is it happening and how can I solve it without the 
sleep, because that's not a admissible solution.

Thank you very much!!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to