cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Azure Shared Clusters - P4J Security Exception on non-whitelisted classes

abhaigh
New Contributor III

Hi all

Having some fun trying to run a notebook on a shared UC-aware, shared cluster - I keep on running into this error:

py4j.security.Py4JSecurityException: Method public static org.apache.spark.sql.SparkSession org.apache.sedona.spark.SedonaContext.create(org.apache.spark.sql.SparkSession) is not whitelisted on class class org.apache.sedona.spark.SedonaContext

Now - the notebook that is having the problem runs perfectly on a non-shared cluster - but I need to have it running on the shared cluster

I can't ANY information on how to get this public static method whitelisted on the class so it can run w/o error on the shared cluster

So...   My question is - "how do I whitelist this public static method so that my cluster doesn't barf when it try's to run the "
SedonaContext.create(spark)"  command that is generating the error?

...and before you suggest it - "Table Access Control" is NOT enabled - so it's not that

Cheers

-=A=-

.

1 ACCEPTED SOLUTION

Accepted Solutions

abhaigh
New Contributor III

Thanks for the reply Kaniz - Not that any of your possible solutions work, but thanks anyway

I don't have the option to set "Notebook Settings" in my databricks notebook in Azure

The system refuses to permit me to set "spark.databricks.pyspark.enablePy4JSecurity false" on the SHARED cluster because of the security risks

You would have been better to have done the same research I did and refer me to THIS page

"spark.databricks.pyspark.enablePy4JSecurity is not allowed when choosing an access mode" [https://community.databricks.com/t5/data-governance/quot-spark-databricks-pyspark-enablepy4jsecurity...]

And this comment on it 

"Hi @Christine Pedersen​ , It is not possible to use it in a shared cluster as of now. Thank you!"[https://community.databricks.com/t5/data-governance/quot-spark-databricks-pyspark-enablepy4jsecurit...

And no - I'm not opening up a support call with Databricks, not when I know what they will tell me

Again, thanks anyway - but what I wanted to do is currently impossible

-=A=-

.

View solution in original post

1 REPLY 1

abhaigh
New Contributor III

Thanks for the reply Kaniz - Not that any of your possible solutions work, but thanks anyway

I don't have the option to set "Notebook Settings" in my databricks notebook in Azure

The system refuses to permit me to set "spark.databricks.pyspark.enablePy4JSecurity false" on the SHARED cluster because of the security risks

You would have been better to have done the same research I did and refer me to THIS page

"spark.databricks.pyspark.enablePy4JSecurity is not allowed when choosing an access mode" [https://community.databricks.com/t5/data-governance/quot-spark-databricks-pyspark-enablepy4jsecurity...]

And this comment on it 

"Hi @Christine Pedersen​ , It is not possible to use it in a shared cluster as of now. Thank you!"[https://community.databricks.com/t5/data-governance/quot-spark-databricks-pyspark-enablepy4jsecurit...

And no - I'm not opening up a support call with Databricks, not when I know what they will tell me

Again, thanks anyway - but what I wanted to do is currently impossible

-=A=-

.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group