GitHub user salilsurendran opened a pull request:

    https://github.com/apache/spark/pull/16664

    [SPARK-18120 ][SQL] Call QueryExecutionListener callback methods for …

    …DataFrameWriter methods
    
    ## What changes were proposed in this pull request?
    QueryExecutionListener has two methods onSuccess() and onFailure() that 
takes a QueryExecution object as a parameter that gets called when a query is 
executed. It gets called for several of the DataSet methods like take, head, 
first, collect etc. but doesn't get called for any of the DataFrameWriter 
methods like saveAsTable, save etc. This commit fixes this issue and makes 
calls to these two methods from DataFrameWriter output methods.
    Also, added a new property "spark.sql.queryExecutionListeners" that can be 
used to specify instances of QueryExecutionListeners that should be attached to 
the SparkSession when the spark application starts up.
    
    ## How was this patch tested?
     Testing was done using unit tests contained in two suites. The unit tests 
can be executed by :
    test-only *SparkSQLQueryExecutionListenerSuite
    test-only *DataFrameCallbackSuite
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/salilsurendran/spark SPARK-18120

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/16664.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16664
    
----
commit 751ded07c7f4e8ab888b3174e3310f603b79ae68
Author: Salil Surendran <salilsurend...@cloudera.com>
Date:   2017-01-20T20:08:12Z

    [SPARK-18120 ][SQL] Call QueryExecutionListener callback methods for 
DataFrameWriter methods
    
    QueryExecutionListener has two methods onSuccess() and onFailure() that 
takes a QueryExecution object as a parameter that gets called when a query is 
executed. It gets called for several of the DataSet methods like take, head, 
first, collect etc. but doesn't get called for any of the DataFrameWriter 
methods like saveAsTable, save etc. This commit fixes this issue and makes 
calls to these two methods from DataFrameWriter output methods.
    Also, added a new property "spark.sql.queryExecutionListeners" that can be 
used to specify instances of QueryExecutionListeners that should be attached to 
the SparkSession when the spark application starts up. Testing was done using 
unit tests.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to