Skip to content

[ZEPPELIN-4802]. pyspark warnings with spark-3.0.0-preview - Sync of properties between JVM and PVM#3778

Closed
zjffdu wants to merge 1 commit intoapache:masterfrom
zjffdu:ZEPPELIN-4802
Closed

[ZEPPELIN-4802]. pyspark warnings with spark-3.0.0-preview - Sync of properties between JVM and PVM#3778
zjffdu wants to merge 1 commit intoapache:masterfrom
zjffdu:ZEPPELIN-4802

Conversation

@zjffdu
Copy link
Contributor

@zjffdu zjffdu commented May 27, 2020

What is this PR for?

This PR will first set env PYSPARK_PIN_THREAD to be true and then suppress the warning message in pyspark.util.

What type of PR is it?

[Improvement ]

Todos

  • - Task

What is the Jira issue?

How should this be tested?

  • CI pass
  • Manually tested

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? no
  • Is there breaking changes for older versions? No
  • Does this needs documentation?

@zjffdu
Copy link
Contributor Author

zjffdu commented May 27, 2020

@Reamer Could you help review it ?

Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

LGTM

@asfgit asfgit closed this in df86e50 Jun 1, 2020
asfgit pushed a commit that referenced this pull request Jun 1, 2020
…properties between JVM and PVM

### What is this PR for?

This PR will first set env `PYSPARK_PIN_THREAD` to be `true` and then suppress the warning message in `pyspark.util`.

### What type of PR is it?
[Improvement ]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4802

### How should this be tested?
* CI pass
* Manually tested

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? No
* Does this needs documentation?

Author: Jeff Zhang <zjffdu@apache.org>

Closes #3778 from zjffdu/ZEPPELIN-4802 and squashes the following commits:

d6a65cb [Jeff Zhang] [ZEPPELIN-4802]. pyspark warnings with spark-3.0.0-preview - Sync of properties between JVM and PVM

(cherry picked from commit df86e50)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>
@Reamer
Copy link
Contributor

Reamer commented Jun 3, 2020

@Reamer Could you help review it ?

I can confirm that the warnings are gone, but it is a good code style to ignore all warnings from `pyspark.util'.

if intp.isSpark3():
    warnings.filterwarnings(action='ignore', module='pyspark.util')

@zjffdu
Copy link
Contributor Author

zjffdu commented Jun 4, 2020

@Reamer I looked at the source code of spark, no matter what user do, it would always print warning message, so I think suppressing the warning is the only way to do that.

https://github.com/apache/spark/blob/master/python/pyspark/util.py#L117

@Reamer
Copy link
Contributor

Reamer commented Jun 4, 2020

Thank you very much for your explanation. Always printing out a warning message is not a good solution. Therefore I also think that suppressing the warning is a good way.

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.

3 participants