Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-42333][SQL] Change log level to debug when fetching result set from SparkExecuteStatementOperation #39876

Closed
wants to merge 1 commit into from

Conversation

wangyum
Copy link
Member

@wangyum wangyum commented Feb 3, 2023

What changes were proposed in this pull request?

Change log level from info to debug when fetching result set from SparkExecuteStatementOperation.

Why are the changes needed?

Avoid generating too many logs:
image

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Unit test.

@github-actions github-actions bot added the SQL label Feb 3, 2023
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

dongjoon-hyun pushed a commit that referenced this pull request Feb 3, 2023
… from SparkExecuteStatementOperation

### What changes were proposed in this pull request?

Change log level from info to debug when fetching result set from `SparkExecuteStatementOperation`.

### Why are the changes needed?

Avoid generating too many logs:
<img width="1230" alt="image" src="https://user-images.githubusercontent.com/5399861/216561187-6ad00458-d196-4f3a-a314-b2f309aec482.png">

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

No.

### How was this patch tested?

Unit test.

Closes #39876 from wangyum/SPARK-42333.

Authored-by: Yuming Wang <yumwang@ebay.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 4ebfc0e)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member

Merged to master/3.4. Thank you, @wangyum .

@@ -96,7 +96,7 @@ private[hive] class SparkExecuteStatementOperation(
private def getNextRowSetInternal(
order: FetchOrientation,
maxRowsL: Long): TRowSet = withLocalProperties {
log.info(s"Received getNextRowSet request order=${order} and maxRowsL=${maxRowsL} " +
log.debug(s"Received getNextRowSet request order=${order} and maxRowsL=${maxRowsL} " +
Copy link
Contributor

@LuciferYang LuciferYang Feb 3, 2023

Choose a reason for hiding this comment

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

hmm... @wangyum @dongjoon-hyun

should we change to use

    if (log.isDebugEnabled) {
      log.debug( ... )
    }

or logDebug(...) here?

Using log.debug directly may not avoid the cost of string splicing ?

Copy link
Member

Choose a reason for hiding this comment

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

IIUC, this is not a perf critical path, @LuciferYang . In addition, the goal of this PR is not to avoid costs. Instead, it aims UX, Avoid generating too many logs:.

Anyway, you can suggest that in general for perf perspective.

snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
… from SparkExecuteStatementOperation

### What changes were proposed in this pull request?

Change log level from info to debug when fetching result set from `SparkExecuteStatementOperation`.

### Why are the changes needed?

Avoid generating too many logs:
<img width="1230" alt="image" src="https://user-images.githubusercontent.com/5399861/216561187-6ad00458-d196-4f3a-a314-b2f309aec482.png">

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

No.

### How was this patch tested?

Unit test.

Closes apache#39876 from wangyum/SPARK-42333.

Authored-by: Yuming Wang <yumwang@ebay.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 4ebfc0e)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants