Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

version of various services using Cloudera Manager API.

Highlighted

version of various services using Cloudera Manager API.

Explorer

Hi,

 

How can i get version of various services (like Hive, Impala etc) using Cloudera Manager API.

 

Say, if i execute "/clusters/{clusterName}/services/{serviceName}" rest api path, i will get details name, healthSummary, serviceState etc.  Like this, i need to get version details of all services up and running in cluster.

 

Thanks in advance.

 

4 REPLIES 4
Highlighted

Re: version of various services using Cloudera Manager API.

Super Collaborator

> How can i get version of various services (like Hive, Impala etc) using Cloudera Manager API.

 

This is not exposed in the CM API -- however you can associate the version of various services via either going to their respective web console, or if you would like to use CM API you can check by viewing the ACTIVATED Parcel [1] and associate it with the CDH release version [2] or against the manifest.json [3].

Alternative, through CM web UI you can execute Host Inspector (CM> Hosts> [Host Inspector])

 

[1] http://[your-cm-server]:7180/api/v11/clusters/[cluster-name]/parcels

[2] http://www.cloudera.com/documentation/enterprise/latest/topics/cdh_vd_cdh_package_tarball.html

[3] example for latest CDH5 http://archive.cloudera.com/cdh5/parcels/latest/manifest.json

Highlighted

Re: version of various services using Cloudera Manager API.

Explorer

Hi,

 

Thanks for your reply.

 

Among the 3, option 1 suits my requirement as i'm accessing the value from a Java program using CM API.

But with this approach, i'm getting version details of few services only.  Eventhough services like hive are up and running, it does not show the version details.

 

Any thoughts?

 

Thanks,

nks

Highlighted

Re: version of various services using Cloudera Manager API.

Super Collaborator

Can you let me know the output of your .../parcels is, for example mine shows 

 

"items" : [ {
    "product" : "CDH",
    "version" : "5.5.1-1.cdh5.5.1.p0.11",
    "stage" : "ACTIVATED",
    "clusterRef" : {
      "clusterName" : "example"
    }
  }, 

This is equivalen of having the following services (HIVE, HDFS ...) versions [1]

 

"parcels": [
        {
            "parcelName": "CDH-5.5.1-1.cdh5.5.1.p0.11-xxxx.parcel",
            "components": [
                {
                    "pkg_version": "0.7.0+cdh5.5.1+0",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "bigtop-tomcat",
                    "version": "6.0.44-cdh5.5.1"
                },
                {
                    "pkg_version": "0.11.0+cdh5.5.1+77",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "crunch",
                    "version": "0.11.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.6.0+cdh5.5.1+29",
                    "pkg_release": "1.cdh5.5.1.p0.16",
                    "name": "flume-ng",
                    "version": "1.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.6.0+cdh5.5.1+924",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hadoop-0.20-mapreduce",
                    "version": "2.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.6.0+cdh5.5.1+924",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hadoop",
                    "version": "2.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.6.0+cdh5.5.1+924",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hadoop-hdfs",
                    "version": "2.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.6.0+cdh5.5.1+924",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hadoop-httpfs",
                    "version": "2.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.6.0+cdh5.5.1+924",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hadoop-kms",
                    "version": "2.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.6.0+cdh5.5.1+924",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hadoop-mapreduce",
                    "version": "2.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.6.0+cdh5.5.1+924",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hadoop-yarn",
                    "version": "2.6.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.0.0+cdh5.5.1+274",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hbase",
                    "version": "1.0.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.5+cdh5.5.1+57",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "hbase-solr",
                    "version": "1.5-cdh5.5.1"
                },
                {
                    "pkg_version": "1.1.0+cdh5.5.1+327",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hive",
                    "version": "1.1.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.1.0+cdh5.5.1+327",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "hive-hcatalog",
                    "version": "1.1.0-cdh5.5.1"
                },
                {
                    "pkg_version": "3.9.0+cdh5.5.1+333",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "hue",
                    "version": "3.9.0-cdh5.5.1"
                },
                {
                    "pkg_version": "2.3.0+cdh5.5.1+0",
                    "pkg_release": "1.cdh5.5.1.p0.17",
                    "name": "impala",
                    "version": "2.3.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.0.0+cdh5.5.1+116",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "kite",
                    "version": "1.0.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.0.0+cdh5.5.1+0",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "llama",
                    "version": "1.0.0-cdh5.5.1"
                },
                {
                    "pkg_version": "0.9+cdh5.5.1+26",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "mahout",
                    "version": "0.9-cdh5.5.1"
                },
                {
                    "pkg_version": "4.1.0+cdh5.5.1+223",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "oozie",
                    "version": "4.1.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.5.0+cdh5.5.1+176",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "parquet",
                    "version": "1.5.0-cdh5.5.1"
                },
                {
                    "pkg_version": "0.12.0+cdh5.5.1+72",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "pig",
                    "version": "0.12.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.5.1+cdh5.5.1+106",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "sentry",
                    "version": "1.5.1-cdh5.5.1"
                },
                {
                    "pkg_version": "4.10.3+cdh5.5.1+325",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "solr",
                    "version": "4.10.3-cdh5.5.1"
                },
                {
                    "pkg_version": "1.5.0+cdh5.5.1+94",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "spark",
                    "version": "1.5.0-cdh5.5.1"
                },
                {
                    "pkg_version": "1.99.5+cdh5.5.1+33",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "sqoop2",
                    "version": "1.99.5-cdh5.5.1"
                },
                {
                    "pkg_version": "1.4.6+cdh5.5.1+29",
                    "pkg_release": "1.cdh5.5.1.p0.14",
                    "name": "sqoop",
                    "version": "1.4.6-cdh5.5.1"
                },
                {
                    "pkg_version": "0.9.0+cdh5.5.1+17",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "whirr",
                    "version": "0.9.0-cdh5.5.1"
                },
                {
                    "pkg_version": "3.4.5+cdh5.5.1+91",
                    "pkg_release": "1.cdh5.5.1.p0.15",
                    "name": "zookeeper",
                    "version": "3.4.5-cdh5.5.1"
                }
            ],

http://archive.cloudera.com/cdh5/parcels/5.5.1.11/manifest.json

Highlighted

Re: version of various services using Cloudera Manager API.

Explorer

Hi,

 

Thanks for your reply.  Sorry for delay, i was held up with some other tasks.

 

Below is the output of my .../parcels command.  But, seems like other service like spark are up and running in the server which is not shown in the .../parcels command.   Output of spark when executing clusters/cluster-name/services command is also copied.

 

 

{
  "items" : [ {
    "product" : "KAFKA",
    "version" : "0.8.2.0-1.kafka1.3.0.p0.29",
    "stage" : "DISTRIBUTED",
    "clusterRef" : {
      "clusterName" : "cluster"
    }
  }, {
    "product" : "IMPALA",
    "version" : "1.2.3-1.p0.97",
    "stage" : "DISTRIBUTING",
    "clusterRef" : {
      "clusterName" : "cluster"
    }
  }, {
    "product" : "KAFKA",
    "version" : "0.8.2.0-1.kafka1.2.0.p0.2",
    "stage" : "ACTIVATED",
    "clusterRef" : {
      "clusterName" : "cluster"
    }
  }, {
    "product" : "CDH",
    "version" : "5.3.0-1.cdh5.3.0.p0.30",
    "stage" : "ACTIVATED",
    "clusterRef" : {
      "clusterName" : "cluster"
    }
  }, {
    "product" : "SOLR",
    "version" : "1.1.0-1.cdh4.3.0.p0.21",
    "stage" : "DISTRIBUTING",
    "clusterRef" : {
      "clusterName" : "cluster"
    }
  }, {
    "product" : "oldcdhparcels",
    "version" : "",
    "stage" : "UNAVAILABLE",
    "clusterRef" : {
      "clusterName" : "cluster"
    }
  } ]
}

 

output of clusters/cluster-name/services command

 

 

{
    "name" : "spark",
    "type" : "SPARK",
    "clusterRef" : {
      "clusterName" : "cluster"
    },
    "serviceUrl" : "http://xxx.com:7180/cmf/serviceRedirect/spark",
    "serviceState" : "STARTED",
    "healthSummary" : "GOOD",
    "healthChecks" : [ ],
    "configStale" : false
  }

 

Thanks,

nks

Don't have an account?
Coming from Hortonworks? Activate your account here