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:ย 

How to get the DBR version details on a HC Cluster

brickster_2018
Databricks Employee
Databricks Employee
 
1 ACCEPTED SOLUTION

Accepted Solutions

brickster_2018
Databricks Employee
Databricks Employee

The below code snippet can be used to get the DBR details on a HC cluster

print("hadoopVersion:" + sc._gateway.jvm.org.apache.hadoop.util.VersionInfo.getVersion())
print("baseVersion:" + sc._gateway.jvm.org.apache.spark.BuildInfo.sparkBranch())
print("baseSha" +sc._gateway.jvm.org.apache.spark.BuildInfo.apacheBase())
print("dbrSha:"+ sc._gateway.jvm.org.apache.spark.BuildInfo.gitHash())

View solution in original post

1 REPLY 1

brickster_2018
Databricks Employee
Databricks Employee

The below code snippet can be used to get the DBR details on a HC cluster

print("hadoopVersion:" + sc._gateway.jvm.org.apache.hadoop.util.VersionInfo.getVersion())
print("baseVersion:" + sc._gateway.jvm.org.apache.spark.BuildInfo.sparkBranch())
print("baseSha" +sc._gateway.jvm.org.apache.spark.BuildInfo.apacheBase())
print("dbrSha:"+ sc._gateway.jvm.org.apache.spark.BuildInfo.gitHash())