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: 

Shared access mode and py4j.security.Py4JSecurityException

cszczotka
New Contributor III

Hi,

We are getting below exception on shared access mode cluster.

py4j.security.Py4JSecurityException: Method public java.lang.String com.databricks.backend.common.rpc.CommandContext.toJson() is not whitelisted on class class com.databricks.backend.common.rpc.CommandContext

I'm trying to find some workaround for this issue  ( other that switch on single user access mode ) like whitelisting this method by setting spark config in my cluster:
spark.driver.extraJavaOption -Dpy4j.security.allowed.methods=com.databricks.backend.common.rpc.CommandContext.toJson spark.executor.extraJavaOptions -Dpy4j.security.allowed.methods=com.databricks.backend.common.rpc.CommandContext.toJson  

Unfortunately it doesn't work. Do you know if syntax is correct or maybe exist other way how to whitelist method for py4j.security.WhitelistingPy4JSecurityManager ? I see that some commercial product running on Databricks has such possibility https://privacera.com/docs/en/whitelist-py4j-security-manager-via-s3-or-dbfs.html

Maybe you know also where can I find code for py4j.security.WhitelistingPy4JSecurityManager ( I don't see anything related with security on https://github.com/py4j/py4j/tree/master/py4j-java ).

Thanks,

 

 

 

 

 

 

2 REPLIES 2

gchandra
Valued Contributor II

Low-level APIs and RDDs won't work on UC Shared Compute clusters (as Governance cannot be enforced on those APIs).

https://medium.com/@gchandra/list/py4jsecurityexception-7e720f2743bc



~

gchandra
Valued Contributor II

If you are looking for any specific property using .toJSON() please do share.



~

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