FAQ
Hi all,

I wrote a blog with examples of using the Cloudera Manager API to set up a
cluster, which might be of interest to you:
http://www.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/

Cheers,
bc

Search Discussions

  • Pavan Kumar Polineni at Jul 1, 2013 at 1:15 pm
    Hi Bc,

    I am getting error. I want to setup a psudo cluster with cloudera manger by
    using Cloudera manager API. Please help me in this

    The Errors i am getting are:

    Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/api_client.py",
    line 124, in get_all_clusters
         return clusters.get_all_clusters(self, view)
       File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/endpoints/clusters.py",
    line 61, in get_all_clusters
         params=view and dict(view=view) or None)
       File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 91, in get
         return self.invoke("GET", relpath, params)
       File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 58, in invoke
         headers=headers)
       File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/http_client.py",
    line 159, in execute
         return self._opener.open(request)
       File "/usr/lib64/python2.6/urllib2.py", line 391, in open
         response = self._open(req, data)
       File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
         '_open', req)
       File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
         result = func(*args)
       File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
         return self.do_open(httplib.HTTPConnection, req)
       File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
         raise URLError(err)
    urllib2.URLError: <urlopen error [Errno 111] Connection refused>
    quit
    On Tuesday, September 11, 2012 2:43:18 AM UTC+5:30, bc Wong wrote:

    Hi all,

    I wrote a blog with examples of using the Cloudera Manager API to set up a
    cluster, which might be of interest to you:

    http://www.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/

    Cheers,
    bc
  • bc Wong at Jul 1, 2013 at 3:58 pm
    Pavan,

    Can I see your code? Most likely your CM is not running, or the connection
    port is not correct.

    On Mon, Jul 1, 2013 at 6:15 AM, Pavan Kumar Polineni wrote:

    Hi Bc,

    I am getting error. I want to setup a psudo cluster with cloudera manger
    by using Cloudera manager API. Please help me in this

    The Errors i am getting are:

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/api_client.py",
    line 124, in get_all_clusters
    return clusters.get_all_clusters(self, view)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/endpoints/clusters.py",
    line 61, in get_all_clusters
    params=view and dict(view=view) or None)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 91, in get
    return self.invoke("GET", relpath, params)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 58, in invoke
    headers=headers)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/http_client.py",
    line 159, in execute
    return self._opener.open(request)
    File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
    File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error [Errno 111] Connection refused>
    quit
    On Tuesday, September 11, 2012 2:43:18 AM UTC+5:30, bc Wong wrote:

    Hi all,

    I wrote a blog with examples of using the Cloudera Manager API to set up
    a cluster, which might be of interest to you:
    http://www.cloudera.com/blog/**2012/09/automating-your-**
    cluster-with-cloudera-manager-**api/<http://www.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/>

    Cheers,
    bc
  • Smart Sunny at Jul 1, 2013 at 6:12 pm
    Hi bc,

    What are prerequisites to use the API. Like CM need to run some thing like this.

    Sent from my iPhone
    On Jul 1, 2013, at 9:28 PM, bc Wong wrote:

    Pavan,

    Can I see your code? Most likely your CM is not running, or the connection port is not correct.

    On Mon, Jul 1, 2013 at 6:15 AM, Pavan Kumar Polineni wrote:
    Hi Bc,

    I am getting error. I want to setup a psudo cluster with cloudera manger by using Cloudera manager API. Please help me in this

    The Errors i am getting are:

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/api_client.py", line 124, in get_all_clusters
    return clusters.get_all_clusters(self, view)
    File "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/endpoints/clusters.py", line 61, in get_all_clusters
    params=view and dict(view=view) or None)
    File "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py", line 91, in get
    return self.invoke("GET", relpath, params)
    File "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py", line 58, in invoke
    headers=headers)
    File "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/http_client.py", line 159, in execute
    return self._opener.open(request)
    File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
    File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error [Errno 111] Connection refused>
    quit
    On Tuesday, September 11, 2012 2:43:18 AM UTC+5:30, bc Wong wrote:

    Hi all,

    I wrote a blog with examples of using the Cloudera Manager API to set up a cluster, which might be of interest to you:
    http://www.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/

    Cheers,
    bc
  • bc Wong at Jul 1, 2013 at 6:15 pm
    The only thing you need is CM. There is no extra daemon that you need to run.
    On Mon, Jul 1, 2013 at 11:12 AM, Smart Sunny wrote:
    Hi bc,

    What are prerequisites to use the API. Like CM need to run some thing like
    this.

    Sent from my iPhone

    On Jul 1, 2013, at 9:28 PM, bc Wong wrote:

    Pavan,

    Can I see your code? Most likely your CM is not running, or the connection
    port is not correct.


    On Mon, Jul 1, 2013 at 6:15 AM, Pavan Kumar Polineni
    wrote:
    Hi Bc,

    I am getting error. I want to setup a psudo cluster with cloudera manger
    by using Cloudera manager API. Please help me in this

    The Errors i am getting are:

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/api_client.py",
    line 124, in get_all_clusters
    return clusters.get_all_clusters(self, view)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/endpoints/clusters.py",
    line 61, in get_all_clusters
    params=view and dict(view=view) or None)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 91, in get
    return self.invoke("GET", relpath, params)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 58, in invoke
    headers=headers)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/http_client.py",
    line 159, in execute
    return self._opener.open(request)
    File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
    File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error [Errno 111] Connection refused>
    quit
    On Tuesday, September 11, 2012 2:43:18 AM UTC+5:30, bc Wong wrote:

    Hi all,

    I wrote a blog with examples of using the Cloudera Manager API to set up
    a cluster, which might be of interest to you:

    http://www.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/

    Cheers,
    bc
  • Pavan Kumar Polineni at Jul 2, 2013 at 2:15 am
    Hi BC,

    In the link you provided in Cloudera
    http://blog.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/
      .

    CM_HOST = "centos56-17.ent.cloudera.com" { Here we need to give the
    Host where the CM is already running right }

    api = ApiResource(CM_HOST, username="admin", password="admin") {here
    also same details like above right. i am struck here as well.


    On Mon, Jul 1, 2013 at 11:45 PM, bc Wong wrote:

    The only thing you need is CM. There is no extra daemon that you need to
    run.
    On Mon, Jul 1, 2013 at 11:12 AM, Smart Sunny wrote:
    Hi bc,

    What are prerequisites to use the API. Like CM need to run some thing like
    this.

    Sent from my iPhone

    On Jul 1, 2013, at 9:28 PM, bc Wong wrote:

    Pavan,

    Can I see your code? Most likely your CM is not running, or the
    connection
    port is not correct.


    On Mon, Jul 1, 2013 at 6:15 AM, Pavan Kumar Polineni
    wrote:
    Hi Bc,

    I am getting error. I want to setup a psudo cluster with cloudera manger
    by using Cloudera manager API. Please help me in this

    The Errors i am getting are:

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/api_client.py",
    line 124, in get_all_clusters
    return clusters.get_all_clusters(self, view)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/endpoints/clusters.py",
    line 61, in get_all_clusters
    params=view and dict(view=view) or None)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 91, in get
    return self.invoke("GET", relpath, params)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 58, in invoke
    headers=headers)
    File
    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/http_client.py",
    line 159, in execute
    return self._opener.open(request)
    File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
    File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error [Errno 111] Connection refused>
    quit
    On Tuesday, September 11, 2012 2:43:18 AM UTC+5:30, bc Wong wrote:

    Hi all,

    I wrote a blog with examples of using the Cloudera Manager API to set
    up
    a cluster, which might be of interest to you:
    http://www.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/
    Cheers,
    bc


    --
      Pavan Kumar Polineni
  • bc Wong at Jul 2, 2013 at 4:28 am
    Pavan,

    Could you show me your *actual* code, and the actual output/error of
    the code? Feel free to mask out the hostname and password.

    Cheers,
    bc

    On Mon, Jul 1, 2013 at 7:15 PM, Pavan Kumar Polineni
    wrote:
    Hi BC,

    In the link you provided in Cloudera
    http://blog.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/
    .

    CM_HOST = "centos56-17.ent.cloudera.com" { Here we need to give the Host
    where the CM is already running right }

    api = ApiResource(CM_HOST, username="admin", password="admin") {here also
    same details like above right. i am struck here as well.


    On Mon, Jul 1, 2013 at 11:45 PM, bc Wong wrote:

    The only thing you need is CM. There is no extra daemon that you need to
    run.

    On Mon, Jul 1, 2013 at 11:12 AM, Smart Sunny <smartsunnyb4u@gmail.com>
    wrote:
    Hi bc,

    What are prerequisites to use the API. Like CM need to run some thing
    like
    this.

    Sent from my iPhone

    On Jul 1, 2013, at 9:28 PM, bc Wong wrote:

    Pavan,

    Can I see your code? Most likely your CM is not running, or the
    connection
    port is not correct.


    On Mon, Jul 1, 2013 at 6:15 AM, Pavan Kumar Polineni
    wrote:
    Hi Bc,

    I am getting error. I want to setup a psudo cluster with cloudera
    manger
    by using Cloudera manager API. Please help me in this

    The Errors i am getting are:

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File

    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/api_client.py",
    line 124, in get_all_clusters
    return clusters.get_all_clusters(self, view)
    File

    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/endpoints/clusters.py",
    line 61, in get_all_clusters
    params=view and dict(view=view) or None)
    File

    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 91, in get
    return self.invoke("GET", relpath, params)
    File

    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/resource.py",
    line 58, in invoke
    headers=headers)
    File

    "/usr/lib/python2.6/site-packages/cm_api-4.0.0-py2.6.egg/cm_api/http_client.py",
    line 159, in execute
    return self._opener.open(request)
    File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
    File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
    File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
    File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error [Errno 111] Connection refused>
    quit
    On Tuesday, September 11, 2012 2:43:18 AM UTC+5:30, bc Wong wrote:

    Hi all,

    I wrote a blog with examples of using the Cloudera Manager API to set
    up
    a cluster, which might be of interest to you:


    http://www.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/

    Cheers,
    bc



    --
    Pavan Kumar Polineni

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedSep 10, '12 at 9:13p
activeJul 2, '13 at 4:28a
posts7
users2
websitecloudera.com
irc#hadoop

2 users in discussion

bc Wong: 4 posts Pavan Kumar Polineni: 3 posts

People

Translate

site design / logo © 2022 Grokbase