Skip to content

Conversation

@AngersZhuuuu
Copy link
Contributor

What changes were proposed in this pull request?

In current code, if we run spark sql with

./bin/spark-sql --verbose

It won't be passed to end SparkSQLCliDriver, then the SessionState won't call setIsVerbose

In the CLI option, it shows

CLI options:
 -v,--verbose                     Verbose mode (echo executed SQL to the
                                  console)

It's not consistent. This pr fix this issue

Why are the changes needed?

Fix bug

Does this PR introduce any user-facing change?

when user call -v when run spark sql, sql will be echoed to console.

How was this patch tested?

Added UT

@AngersZhuuuu
Copy link
Contributor Author

gentle ping @yaooqinn @cloud-fan

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41916/

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41916/

@HyukjinKwon
Copy link
Member

cc @wangyum too FYI

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Test build #137337 has finished for PR 32163 at commit e7ccfa0.

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

@github-actions
Copy link

Test build #748540421 for PR 32163 at commit 7ab7599.

@github-actions
Copy link

Test build #748540421 for PR 32163 at commit e7ccfa0.

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41929/

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41929/

}

test("SPARK-35086: --verbose should be passed to Spark SQL CLI") {
runCliWithin(2.minute,
Copy link
Member

Choose a reason for hiding this comment

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

nit: inline, runCliWithin(2.minute, Seq("--verbose"))("SELECT 1;" -> "SELECT 1")

@SparkQA
Copy link

SparkQA commented Apr 14, 2021

Test build #137350 has finished for PR 32163 at commit 195c933.

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

@github-actions
Copy link

Test build #748540421 for PR 32163 at commit 195c933.

@github-actions
Copy link

Test build #750310558 for PR 32163 at commit 4d88408.

@SparkQA
Copy link

SparkQA commented Apr 15, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41961/

@SparkQA
Copy link

SparkQA commented Apr 15, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41961/

@SparkQA
Copy link

SparkQA commented Apr 15, 2021

Test build #137384 has finished for PR 32163 at commit 4d88408.

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

@wangyum wangyum closed this in 9b2e0d6 Apr 15, 2021
@wangyum
Copy link
Member

wangyum commented Apr 15, 2021

Merged to master.

@HyukjinKwon
Copy link
Member

The JIRA number here was incorrect. It had to be SPARK-35068.

@HyukjinKwon
Copy link
Member

I switched the JIRA between SPARK-35068 and SPARK-35086. cc @MaxGekk FYI

@LuciferYang
Copy link
Contributor

We build a client with v3.2.0 and run bin/spark-shell --master local --verbose, the spark-shell startup failed now @AngersZhuuuu @cloud-fan @yaooqinn @dongjoon-hyun @HyukjinKwon @wangyum ,Is this expected?

Also ping @toujours33

Main class:
org.apache.spark.repl.Main
Arguments:
--verbose
Spark config:
(spark.jars,)
(spark.app.name,Spark shell)
(spark.submit.pyFiles,)
(spark.ui.showConsoleProgress,true)
(spark.submit.deployMode,client)
(spark.master,local)
Classpath elements:



Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
bad option: '--verbose'

@LuciferYang
Copy link
Contributor

LuciferYang commented Oct 19, 2021

And bin/spark-shell --master local --verbose can startup spark-shell succesfuls use Spark 3.1.2

@AngersZhuuuu
Copy link
Contributor Author

We build a client with v3.2.0 and run bin/spark-shell --master local --verbose, the spark-shell startup failed now @AngersZhuuuu @cloud-fan @yaooqinn @dongjoon-hyun @HyukjinKwon @wangyum ,Is this expected?

Also ping @toujours33

Main class:
org.apache.spark.repl.Main
Arguments:
--verbose
Spark config:
(spark.jars,)
(spark.app.name,Spark shell)
(spark.submit.pyFiles,)
(spark.ui.showConsoleProgress,true)
(spark.submit.deployMode,client)
(spark.master,local)
Classpath elements:



Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
bad option: '--verbose'

Checking this.

@LuciferYang
Copy link
Contributor

Thanks @AngersZhuuuu

@HyukjinKwon
Copy link
Member

Thanks @LuciferYang and @AngersZhuuuu!

@yaooqinn
Copy link
Member

Looks like a bug, thanks @LuciferYang and @AngersZhuuuu!

@AngersZhuuuu
Copy link
Contributor Author

Found the reason, raise a fix pr soon and with a spark-shell verbose unit test

cloud-fan pushed a commit that referenced this pull request Oct 19, 2021
… class when is sql shell

### What changes were proposed in this pull request?
In #32163 spark pass `--verbose` to main class o support spark-sql shell can use verbose argument too.
But for other shell main class such as saprk-shell, it's intercepter don't support `--verbose`, so we should only pass `--verbose` for sql shell

### Why are the changes needed?
Fix bug

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

Closes #34322 from AngersZhuuuu/SPARK-37052.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
cloud-fan pushed a commit that referenced this pull request Oct 19, 2021
… class when is sql shell

### What changes were proposed in this pull request?
In #32163 spark pass `--verbose` to main class o support spark-sql shell can use verbose argument too.
But for other shell main class such as saprk-shell, it's intercepter don't support `--verbose`, so we should only pass `--verbose` for sql shell

### Why are the changes needed?
Fix bug

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

Closes #34322 from AngersZhuuuu/SPARK-37052.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit a6d3a2c)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
sunchao pushed a commit to sunchao/spark that referenced this pull request Dec 8, 2021
… class when is sql shell

### What changes were proposed in this pull request?
In apache#32163 spark pass `--verbose` to main class o support spark-sql shell can use verbose argument too.
But for other shell main class such as saprk-shell, it's intercepter don't support `--verbose`, so we should only pass `--verbose` for sql shell

### Why are the changes needed?
Fix bug

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

Closes apache#34322 from AngersZhuuuu/SPARK-37052.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit a6d3a2c)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 34086b0)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
catalinii pushed a commit to lyft/spark that referenced this pull request Feb 22, 2022
… class when is sql shell

### What changes were proposed in this pull request?
In apache#32163 spark pass `--verbose` to main class o support spark-sql shell can use verbose argument too.
But for other shell main class such as saprk-shell, it's intercepter don't support `--verbose`, so we should only pass `--verbose` for sql shell

### Why are the changes needed?
Fix bug

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

Closes apache#34322 from AngersZhuuuu/SPARK-37052.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit a6d3a2c)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
catalinii pushed a commit to lyft/spark that referenced this pull request Mar 4, 2022
… class when is sql shell

### What changes were proposed in this pull request?
In apache#32163 spark pass `--verbose` to main class o support spark-sql shell can use verbose argument too.
But for other shell main class such as saprk-shell, it's intercepter don't support `--verbose`, so we should only pass `--verbose` for sql shell

### Why are the changes needed?
Fix bug

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

Closes apache#34322 from AngersZhuuuu/SPARK-37052.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit a6d3a2c)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants