Skip to content

[SPARK-4871][SQL] Show sql statement in spark ui when run sql with spark-sql#3718

Closed
scwf wants to merge 5 commits intoapache:masterfrom
scwf:sparksqlui
Closed

[SPARK-4871][SQL] Show sql statement in spark ui when run sql with spark-sql#3718
scwf wants to merge 5 commits intoapache:masterfrom
scwf:sparksqlui

Conversation

@scwf
Copy link
Contributor

@scwf scwf commented Dec 17, 2014

No description provided.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24531 has started for PR 3718 at commit 92ce834.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24531 has finished for PR 3718 at commit 92ce834.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24531/
Test FAILed.

@scwf
Copy link
Contributor Author

scwf commented Dec 17, 2014

retest this please.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24532 has started for PR 3718 at commit 92ce834.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24532 has finished for PR 3718 at commit 92ce834.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24532/
Test FAILed.

@scwf
Copy link
Contributor Author

scwf commented Dec 17, 2014

retest this please.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24539 has started for PR 3718 at commit 92ce834.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24539 has finished for PR 3718 at commit 92ce834.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24539/
Test FAILed.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24540 has started for PR 3718 at commit df79837.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 17, 2014

Test build #24540 has finished for PR 3718 at commit df79837.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24540/
Test PASSed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about just using the function that only sets the job description. I know it is deprecated, but @rxin is the one who deprecated it and says that we won't remove it.

@rxin should we undeprecate that function too BTW?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or to use setLocalProperty(SparkContext.SPARK_JOB_DESCRIPTION, description) ?setJobDescription essentially calls it.

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24570 has started for PR 3718 at commit 4d2038a.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24570 has finished for PR 3718 at commit 4d2038a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24570/
Test FAILed.

@scwf
Copy link
Contributor Author

scwf commented Dec 18, 2014

Retest this please.

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24580 has started for PR 3718 at commit 4d2038a.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24580 has finished for PR 3718 at commit 4d2038a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24580/
Test PASSed.

@scwf
Copy link
Contributor Author

scwf commented Dec 19, 2014

Updated

@SparkQA
Copy link

SparkQA commented Dec 19, 2014

Test build #24625 has started for PR 3718 at commit e0d6b5d.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 19, 2014

Test build #24625 has finished for PR 3718 at commit e0d6b5d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/24625/
Test PASSed.

@scwf
Copy link
Contributor Author

scwf commented Dec 19, 2014

@marmbrus, is this ok to go?

@marmbrus
Copy link
Contributor

Lets wait for some feedback from @rxin or @pwendell on the APIs in question here.

@rxin
Copy link
Contributor

rxin commented Dec 20, 2014

LGTM - but are we sure we don't want to set the job group id? We can use that to cancel running commands.

@scwf
Copy link
Contributor Author

scwf commented Dec 20, 2014

i think this is ok. Even if we set the job group id, we can not use the cancel api to cancel job in spark-sql or beeline.

@marmbrus
Copy link
Contributor

In principle I agree with @rxin. We probably should be setting the job group id and saving it so that if the users presses ctrl-c (or calls Statement#cancel() from JDBC) we could use it to cancel the running job. What seemed odd to me was to set it to something random and throw away that id. Either way though, I'm okay with adding cancelation in a followup PR since having the query in the UI is nice.

@marmbrus
Copy link
Contributor

One other thought: how does this handle really long queries, or ones with a lots of new lines? Does it mess up the UI? Do we need to truncate the statement? Can you post a screen shot?

@scwf
Copy link
Contributor Author

scwf commented Dec 20, 2014

1 My locally test it seems ctrl-c stops(not cancel) a running sql.

2 The sql statement wraps in ui auto.
image

@markhamstra
Copy link
Contributor

That wrapping in the UI is barely tolerable for what are still fairly modest-length queries. We're really going to need some kind of elided query in the main Jobs table with a link or pop-up containing the full, pretty-printed query.

@scwf
Copy link
Contributor Author

scwf commented Dec 22, 2014

Ok, i will add a pop-up containing the full

@liancheng
Copy link
Contributor

@marmbrus Maybe I missed something here, but why do we prefer setJobDescription over setJobGroup, especially when the former is deprecated?

@scwf For job cancellation/stopping, under which shell did you try CTRL-C? Beeline doesn't install a proper signal handler, thus CTRL-C simply kills beeline without stopping/canceling any running job. Actually there is a signal handler for JDBC statement cancellation, but it's commented out in beeline code. If you were trying spark-sql or spark-shell scripts, a CTRL-C kills the main SparkContext, thus all statements are stopped by force.

Would like to add that there is a known job description issue related to CTAS statements, see SPARK-2472. This PR shares exactly the same issue. Main point of SPARK-2472 quoted below:

... The reason is that InsertIntoHiveTable.execute() submits a job to perform the insertion eagerly at the end of the query planning phase. At that time, the job description hasn't been updated, thus shows the previous one.

@marmbrus
Copy link
Contributor

It's not deprecated for any good reason and I think we should undeprecate it.

I'm not opposed to setting the job group, but I am opposed to setting it to a random value and then throwing that away. That seems to have no point, and would override a value that might have been set for some reason elsewhere.

@liancheng
Copy link
Contributor

I see. Yes, a random group ID string is not intuitive nor useful. And just realize another reason that we shouldn't set group ID in SparkExecuteStatementOperation.run: this class is also used in the Thrift server, which can be accessed by multiple concurrent connections. Interleaved concurrent SQL jobs may mess up the group IDs.

@scwf
Copy link
Contributor Author

scwf commented Dec 29, 2014

Filed a PR to add pop-up for full job description #3819

@scwf
Copy link
Contributor Author

scwf commented Dec 30, 2014

@marmbrus, can this go since i have filed a PR to add pop-up for full job desc?

@liancheng
Copy link
Contributor

This LGTM.

@scwf
Copy link
Contributor Author

scwf commented Jan 10, 2015

ping @marmbrus

@marmbrus
Copy link
Contributor

Thanks, merged to master

@asfgit asfgit closed this in 92d9a70 Jan 11, 2015
@scwf scwf deleted the sparksqlui branch January 11, 2015 01:28
asfgit pushed a commit that referenced this pull request Jan 21, 2015
…cription when it is very long

In some case the job description will be very long, such as a long sql. refer to #3718
This PR add a pop-up for job description when it is long.

![image](https://cloud.githubusercontent.com/assets/7018048/5847400/c757cbbc-a207-11e4-891f-528821c2e68d.png)

![image](https://cloud.githubusercontent.com/assets/7018048/5847409/d434b2b4-a207-11e4-8813-03a74b43d766.png)

Author: wangfei <wangfei1@huawei.com>

Closes #3819 from scwf/popup-descrip-ui and squashes the following commits:

ba02b83 [wangfei] address comments
a7c5e7b [wangfei] spot that it's been truncated
fbf6162 [wangfei] Merge branch 'master' into popup-descrip-ui
0bca96d [wangfei] remove no use val
4b55c3b [wangfei] fix style issue
353c6f4 [wangfei] pop up the description of job with a styled read-only text form field
scwf added a commit to Huawei-Spark/spark that referenced this pull request Jan 22, 2015
…cription when it is very long

In some case the job description will be very long, such as a long sql. refer to apache#3718
This PR add a pop-up for job description when it is long.

![image](https://cloud.githubusercontent.com/assets/7018048/5847400/c757cbbc-a207-11e4-891f-528821c2e68d.png)

![image](https://cloud.githubusercontent.com/assets/7018048/5847409/d434b2b4-a207-11e4-8813-03a74b43d766.png)

Author: wangfei <wangfei1@huawei.com>

Closes apache#3819 from scwf/popup-descrip-ui and squashes the following commits:

ba02b83 [wangfei] address comments
a7c5e7b [wangfei] spot that it's been truncated
fbf6162 [wangfei] Merge branch 'master' into popup-descrip-ui
0bca96d [wangfei] remove no use val
4b55c3b [wangfei] fix style issue
353c6f4 [wangfei] pop up the description of job with a styled read-only text form field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants