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())