Reputation: 520
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?
Upvotes: 0
Views: 300
Reputation: 53
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
Upvotes: 1