cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Method public void org.apache.spark.sql.internal.CatalogImpl.clearCache() is not whitelisted on clas

NhanNguyen
Contributor II

I'm executing a notebook and failed with this error:

Screenshot 2024-04-03 at 21.49.46.png

 

Sometime, when i execute some function in spark and also failed with the error 'this class is not whitelist'. 

Could everyone help me check on this?

Thanks for your help!

2 REPLIES 2

Ayushi_Suthar
Databricks Employee
Databricks Employee

Hi @NhanNguyen , Hope you are doing well! 

Can you please confirm which cluster access mode you are using to run the above notebook command? 

As per the error details in the screenshot, I am assuming you are using catalog.clear_cache on the Shared Cluster mode and currently, the "catalog.clear_cache" feature does not support shared cluster mode and is only applicable for single-user mode or no isolation shared mode. This limitation is due to the current design of shared clusters in Databricks. 

So in case you are using the shared cluster mode, could you please try to run the commands on the Single User or no-isolation shared access mode?

Please let me know if this helps and leave a like if this information is useful, followups are appreciated.
Kudos
Ayushi

NhanNguyen
Contributor II

Thanks for your feedback, actually my cluster is shared cluster, and then I change to single cluster then can run that method/

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