02-03-2015 04:32 AM
I am following the below link to create a cluster
I installed python using yum install ( python 2.6 )
After that from python cli i entered the below command
from cm_api.api_client import ApiResource
CM_HOST = "10.xxx.xx.xxx"
api = ApiResource(CM_HOST, username="admin", password="admin")
cluster = api.create_cluster("prod01", "CDH5")
Its throwing the error ImportError: No module named cm_api.api_client
I am not able to locate the library file...
Am i missing something ?
02-03-2015 07:34 PM
02-03-2015 08:57 PM
Thanks very much for your help.
I installed and its working. Now I stuck up with some other issues .
I am trying to setup a hadoop cluster ( CDH5 - YARN ) using cloudera manager API and python client. Do we need to upgrade any packages (API ) ?
I am following the below link http://blog.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/
Is there any other document available ?
"Role type configuration is supported only up to API v2"
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
File "/usr/lib/python2.6/site-packages/cm_api-8.0.0-py2.6.egg/cm_api/endpoints/services.py", line 523, in update_config
resp = self._get_resource_root().put(path, data = json.dumps(data))
File "/usr/lib/python2.6/site-packages/cm_api-8.0.0-py2.6.egg/cm_api/resource.py", line 152, in put
File "/usr/lib/python2.6/site-packages/cm_api-8.0.0-py2.6.egg/cm_api/resource.py", line 63, in invoke
File "/usr/lib/python2.6/site-packages/cm_api-8.0.0-py2.6.egg/cm_api/http_client.py", line 161, in execute
cm_api.api_client.ApiException: Role type configuration is supported only up to API v2. (error 400)
04-21-2015 10:38 PM
I am also receiving the similar Import error. However when I try to install API separately as per the document in the link you given I have received the below error. Could you please help me with this ? TIA
sudo pip install cm-api
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement cm-api
No distributions at all found for cm-api
Storing debug log for failure in /root/.pip/pip.log
04-22-2015 03:14 AM
This error is due to internet connectivity issue or pip installation issue with the server. I manually downloaded cm-api modules and installed. Working good now.