Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20703][SQL][WIP] Add an operator for writing data out - #17998
[SPARK-20703][SQL][WIP] Add an operator for writing data out#17998viirya wants to merge 3 commits into
Conversation
hvanhovell
commented
May 16, 2017
@shaneknapp is amplap jenkins down? |
shaneknapp
commented
May 16, 2017
via email
yep. it was wedged, so i kicked it and it's back now. …On Tue, May 16, 2017 at 7:34 AM, Herman van Hovell ***@***.*** > wrote:
@shaneknapp <https://github.com/shaneknapp> is amplap jenkins down?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17998 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABiDrG901lIJIaajUix8U4MfQLM1KAfUks5r6bP2gaJpZM4NcSg8>
.
|
SparkQA
commented
May 16, 2017
Test build #76960 has finished for PR 17998 at commit
|
gatorsmile
commented
May 16, 2017
How about |
viirya
commented
May 17, 2017
|
viirya
commented
May 17, 2017
Btw, |
viirya
commented
May 17, 2017
cc @rxin Do you think the current approach makes sense to you? Thanks. |
viirya
commented
May 31, 2017
#18064 is merged. Since it changes relative classes and code paths a lot. And seems an alternative approach for showing the metrics of writing data out is better. I'd close this and create a new PR for this. |
What changes were proposed in this pull request?
Right now in the explain plan / UI, we have no way to tell whether a query is writing data out, and also there is no way to associate metrics with data writes. We should add an operator for writing data out. This operator can be used to track writing data out and related metrics.
The Approach
We have several paths for writing data out through some
RunnableCommandclasses.File-based relation:
InsertIntoHadoopFsRelationCommand,InsertIntoHiveTableThose commands use
FileFormatWriterto write out data files. We can record some metrics inFileFormatWriterand update it later.FileFormatWriteraccepts aQueryExecution. We can track the execution plan ofQueryExecution.This patch adds a new operator
WriteDataFileOutExec. It is simply used to track the metrics of writing data file out for file-based relations. Currently we track some metrics:Other datasources:
InsertIntoDataSourceCommand,SaveIntoDataSourceCommandFor other datasource relations, the logic of writing data out is delegated to the datasource implementations, e.g.,
InsertableRelation.insert,CreatableRelationProvider.createRelation. The APIs basically take aDataFramefor the data to write. Those APIs can possibly create newDataFramebased on the give one. So we can't easily track its execution, and theoretically we don't know the details of the API implementation in those datasources. So we can't obtain enough metrics.Note:
SaveIntoDataSourceCommandcan possibly go to invokeInsertIntoHadoopFsRelationCommandfor file-based data sources. For this case, the metrics should be tracked asInsertIntoHadoopFsRelationCommand.Note:
CreateDataSourceTableAsSelectCommandworks similarly asSaveIntoDataSourceCommand.Note:
CreateHiveTableAsSelectCommandinserts data by invokingInsertIntoHiveTable.How was this patch tested?
Jenkins tests.
Please review http://spark.apache.org/contributing.html before opening a pull request.