cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to run 2 different applications with the same class name on a cluster

User16869510359
Esteemed Contributor

I have two jars with the same class name. It works fine on yarn. When trying to run these jars on the Databricks cluster, I run into issues. Why Databricks is having this limitation?

1 ACCEPTED SOLUTION

Accepted Solutions

User16869510359
Esteemed Contributor

When you run the jobs in Yarn, those are 2 different applications getting submitted on Yarn. Hence each application will have a separate Spark driver JVM's.

In Databricks, a cluster has one JVM for the Spark driver. When applications with the same name are submitted on the same JVM, it's possible the classes are loaded from the incorrect jars.

Mitigations/Solution:

  • Use an on-demand cluster for your jobs. This will ensure one jar uses a dedicated cluster.
  • Change the class name in one of the classes to avoid conflict.

View solution in original post

1 REPLY 1

User16869510359
Esteemed Contributor

When you run the jobs in Yarn, those are 2 different applications getting submitted on Yarn. Hence each application will have a separate Spark driver JVM's.

In Databricks, a cluster has one JVM for the Spark driver. When applications with the same name are submitted on the same JVM, it's possible the classes are loaded from the incorrect jars.

Mitigations/Solution:

  • Use an on-demand cluster for your jobs. This will ensure one jar uses a dedicated cluster.
  • Change the class name in one of the classes to avoid conflict.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.