cloudera5pythonapi无法创建集群

rxztt3cl  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(278)

我已经手动安装了新的cloudera5管理器

wget http://archive.cloudera.com/cdh5/one-click-install/redhat/6/x86_64/cloudera-cdh-5-0.x86_64.rpm
rpm -ivh cloudera-cdh-5-0.x86_64.rpm
cd /etc/yum.repos.d/
wget http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/cloudera-manager.repo
cd /usr/src
wget http://archive.cloudera.com/cm5/redhat/6/x86_64/cm/5/RPMS/x86_64/oracle-j2sdk1.7-1.7.0+update45-1.x86_64.rpm
rpm -ivh oracle-j2sdk1.7-1.7.0+update45-1.x86_64.rpm
yum -y install cloudera-manager-server cloudera-manager-server-db-2 
/etc/init.d/cloudera-scm-server-db stop
/etc/init.d/cloudera-scm-server-db start
/etc/init.d/cloudera-scm-server stop
/etc/init.d/cloudera-scm-server start

我正在使用pythonapi创建集群。。。
http://cloudera.github.io/cm_api/docs/python-client/
但是我得到了这个错误

[kshk@localhost ~]$ python
Python 2.7.5 (default, Nov 12 2013, 16:19:08) 
[GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cm_api.api_client import ApiResource
>>> import socket
>>> cm_host = "192.168.174.190"
>>> api = ApiResource(cm_host, username="admin", password="admin")
>>> cluster = api.create_cluster("clusterD", "CDH5")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/api_client.py", line 108, in create_cluster
    return clusters.create_cluster(self, name, version)
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/endpoints/clusters.py", line 34, in create_cluster
    data=[apicluster])[0]
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/endpoints/types.py", line 141, in call
    return ApiList.from_json_dict(ret, method.im_self, ret_type)
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/endpoints/types.py", line 419, in from_json_dict
    items = [ attr.from_json(resource_root, x) for x in dic[ApiList.LIST_KEY] ]
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/endpoints/types.py", line 97, in from_json
    return self._atype.from_json_dict(data, resource_root)
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/endpoints/types.py", line 286, in from_json_dict
    obj._set_attrs(dic, allow_ro=True)
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/endpoints/types.py", line 221, in _set_attrs
    attr = self._check_attr(k, allow_ro)
  File "/usr/lib/python2.7/site-packages/cm_api-6.0.1-py2.7.egg/cm_api/endpoints/types.py", line 234, in _check_attr
    (name, self.__class__.__name__))
AttributeError: Invalid property fullVersion for class ApiCluster.

有什么想法吗???

n7taea2i

n7taea2i1#

在这篇文章发表了四个小时之后,pythonclouderaapi出现了一个问题;api已经更新,现在可以正常工作了。。。

相关问题