Member since
05-08-2017
11
Posts
1
Kudos Received
0
Solutions
09-26-2017
11:57 AM
Hi, I am trying to use cm python api, but it keeps failing out. Not sure, what is causing the issue. I get 404 error ! which I think represents object not found. Below is the code snippet import datetime
import getpass
import re
from cm_api.api_client import ApiResource
# Connection information.
host = 'XXXXXXXXXXXXXXXXXXXXXXX'
port = 7180
user = 'admin'
password = 'admin'
api = ApiResource(host, 7180, user, password)
# Finds the first YARN service in the first cluster.
cluster = api.get_all_clusters()[0] Its failing with Message Traceback (most recent call last):
File "scan-work-items.py", line 23, in <module>
cluster = api.get_all_clusters()[0]
File "/usr/lib/python2.6/site-packages/cm_api/api_client.py", line 131, in get_all_clusters
return clusters.get_all_clusters(self, view)
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/clusters.py", line 66, in get_all_clusters
params=view and dict(view=view) or None)
File "/usr/lib/python2.6/site-packages/cm_api/endpoints/types.py", line 139, in call
ret = method(path, params=params)
File "/usr/lib/python2.6/site-packages/cm_api/resource.py", line 110, in get
return self.invoke("GET", relpath, params)
File "/usr/lib/python2.6/site-packages/cm_api/resource.py", line 73, in invoke
headers=headers)
File "/usr/lib/python2.6/site-packages/cm_api/http_client.py", line 183, in execute
raise self._exc_class(ex)
cm_api.api_client.ApiException: (error 404)
Is it because of running python 2.6 ? I am running this on NameNode in my lab cluster(6 Node) that is running outside the production CM cluster. I am trying to use the API to connect to production cluster to fetch some metrics, but it keeps erroring out. Also, We have RM HA. Is there a way to find which node is my active Resource Manager ? and the URL for it ? without logging into CM ?
... View more
Labels:
- Labels:
-
Apache YARN
-
Cloudera Manager
06-29-2017
09:55 PM
Hi, I just kerberized my cluster and hue kerberos ticket renewer is throwing below error Couldn't renew kerberos ticket in order to work around Kerberos 1.8.1 issue. Please check that the ticket for 'hue/fqdn@EQ.COM' is still renewable: $ kinit -f -c /tmp/hue_krb5_ccache If the 'renew until' date is the same as the 'valid starting' date, the ticket cannot be renewed. Please check your KDC configuration, and the ticket renewal policy (maxrenewlife) for the 'hue/fqdn@EQ.COM' and `krbtgt' principals. If I run the command, its prompting for password which I don't know for hue. I am not able to see renew time from below command either. [root@-hue-KT_RENEWER]# KRB5CCNAME=/tmp/hue_krb5_ccache klist -fe Ticket cache: FILE:/tmp/hue_krb5_ccache Default principal: hue/fqdn@EQ.COM Valid starting Expires Service principal 06/30/2017 00:34:39 07/01/2017 00:34:39 krbtgt/EQ.COM@EQ.COM Flags: FI, Etype (skey, tkt): aes256-cts-hmac-sha1-96, aes256-cts-hmac-sha1-96 my conf files is like below: [root@259-hue-KT_RENEWER]# cat /etc/krb5.conf # Configuration snippets may be placed in this directory as well includedir /etc/krb5.conf.d/ [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] dns_lookup_realm = false ticket_lifetime = 24h renew_lifetime = 7d forwardable = true rdns = false default_realm = EQ.COM default_ccache_name = KEYRING:persistent:%{uid} default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 permitted_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 [realms] EQ.COM = { kdc = fqdn admin_server = fqdn } [root]# cat /var/kerberos/krb5kdc/kdc.conf [kdcdefaults] kdc_ports = 88 kdc_tcp_ports = 88 [realms] EQ.COM = { #master_key_type = aes256-cts acl_file = /var/kerberos/krb5kdc/kadm5.acl dict_file = /usr/share/dict/words admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab supported_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 max_renewable_life = 7d 0h 0m 0s default_principal_flags = +renewable } while I was kerberizing the cluster, it was starting the service one by one. Impala failed before Hue. So it never got to the point of starting hue. Since all services were running except for Impala and Hue. I proceeded with error, thinking I will start hue separately, perhaps it was a dumb move but the installation was stuck at that point so I had to move forward with error. Ever since that, I am seeing the error for hue. I removed Impala completely from cluster. Removed and added hue in different nodes, still KTR fails. Is there a way to solve this ?
... View more
Labels:
- Labels:
-
Cloudera Hue
-
Cloudera Manager
-
Kerberos
-
Security
05-09-2017
01:01 PM
@Fawze We have both but majority of them are MapReduce. They all run on YARN though. I could use Spark history to collect metrics for that but for MapReduce, still trying. I tried summation of Vcores seconds taken my Mapper & Reducer, yet they don't tally with the Aggregated value I see in Cloudera Manager or in Yarn Application -status <app_id>. Perhaps, I am overlooking something during conversion. I am doing Milliseconds to seconds.. Hope, I am doing it right
... View more
05-09-2017
08:07 AM
Another question on the same lines, if you don't mind answering. What is the criteria to calculate the aggregate resource allocation, meaning, is it possible to arrive at those figures by using any of the counters in Job History server for the applications ?
... View more
05-09-2017
08:03 AM
Makes sense, I wanted to do the same... Like extract and load into db for later retrieval but was wondering if they were stored historically anywhere. Thanks Fawze. I will accept this as answer if there is no other way to retrieve.
... View more
05-09-2017
07:39 AM
@Fawze wrote: Hi @code0404 Yes, you can use the Yarn histort API Please see the following documntation: https://hadoop.apache.org/docs/r2.6.0/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html Hi @Fawze Thanks for sharing the API, I looked at this before. The problem with this API is, it will only retrieve application stastics that is still available in RM. I reckon, application that are older than 24-48 hours are moved out of RM to JHIST server. So those application stats are no longer retrievable. I can do batch collection everyday and store them locally for retrieving later, but I am keen on understanding how Cloudera Manager is retrieving this info i.e. via some API or logs from cluster or uses its own internal database with frequent backend stats collection.
... View more
05-08-2017
03:07 PM
1 Kudo
Hi, How do find Aggregate Resource Allocation for an application run on Yarn ? I know Yarn application -status <application Id> provides that info, but it doesn't work for historical jobs as they won't present in Resource Manager then. I see I could find this information from Cloudera Manager though. Is Cloudera Manager preserving this information upon their expiry ? if so, Is there any API that I can leverage to retrieve this info for historical jobs. Alternatively, I glanced through the job history server counters but couldn't tie out while reconciling which gives me a strange feeling that I might be looking at wrong counters. The information I am looking for is highlighted below yarn application -status application_XXXXXXXXXXX_XXX97 Application-Id : application_XXXXXXXXXXX_XXX97 Application-Name : blah blah blah Application-Type : MAPREDUCE User : user1 Queue : queue1 Start-Time : 1494279901683 Finish-Time : 1494280086823 Progress : 100% State : FINISHED Final-State : SUCCEEDED Aggregate Resource Allocation : 674854 MB-seconds, 329 vcore-seconds Log Aggregation Status : SUCCEEDED Diagnostics : Interested in either using an API if this information is readily available or how do I calculate it from the available data in JOb history counters. Thanks in advance
... View more
Labels:
- Labels:
-
Apache YARN
-
Cloudera Manager