Programmatic way to find the cluster version from CDSW - Cloudera Data Science Workbench

285 views Asked by At

Is there any programmatic way to find out the cluster version(CDH6 or CDP7) from a CDSW session? Could any environment variable give a fool-proof way to determine the cluster version?

1

There are 1 answers

0
Milan Vaibhav On

You can use cloudera rest apis to achieve this. https://:7180/api/v43/cm/version

Result:

{ "version" : version, "buildUser" : "jenkins", "buildTimestamp" : "20180402-2150", "gitHash" : "4adcd280dde9c492680ada3ee369b4e97d22137a", "snapshot" : false }

API docs : https://archive.cloudera.com/cm7/7.2.4/generic/jar/cm_api/apidocs/index.html