Package cm_shell :: Module cmps :: Class ClouderaShell
[hide private]
[frames] | no frames]

Class ClouderaShell

source code

cmd.Cmd --+
          |
         ClouderaShell

Interactive shell for communicating with your Cloudera Cluster making use of the cm_api

Instance Methods [hide private]
 
preloop(self)
Checks if the cluster was pre-defined
source code
 
generate_output(self, headers, rows, align=None) source code
 
emptyline(self)
Called each time a user hits enter, by default it will redo the last command, this is an extension so it does nothing.
source code
 
set_cluster(self, cluster) source code
 
has_cluster(self) source code
 
get_log(self, role, log_type=None) source code
 
do_status(self, service)
List all services on the cluster...
source code
 
do_log(self, role)
Download log file for role...
source code
 
do_stdout(self, role)
Download stdout file for role...
source code
 
do_stderr(self, role)
Download stderr file for role...
source code
 
do_show(self, option, single=None)
General System Information Usage: > show clusters list of clusters this CM manages > show hosts list of all hosts CM manages > show services list of all services on this cluster including their health.
source code
 
complete_log(self, text, line, start_index, end_index) source code
 
complete_stdout(self, text, line, start_index, end_index) source code
 
complete_stderr(self, text, line, start_index, end_index) source code
 
complete_show(self, text, line, start_index, end_index) source code
 
service_action(self, service, action)
Perform given action on service for the selected cluster
source code
 
services_autocomplete(self, text, line, start_index, end_index, append=[]) source code
 
do_start_service(self, service)
Start a service...
source code
 
complete_start_service(self, text, line, start_index, end_index) source code
 
do_restart_service(self, service)
Restart a service...
source code
 
complete_restart_service(self, text, line, start_index, end_index) source code
 
do_stop_service(self, service)
Stop a service...
source code
 
complete_stop_service(self, text, line, start_index, end_index) source code
 
do_use(self, cluster)
Connect to Cluster...
source code
 
cluster_autocomplete(self, text, line, start_index, end_index)
autocomplete for the use command, obtain list of clusters first
source code
 
complete_use(self, text, line, start_index, end_index) source code
 
do_roles(self, service)
Role information...
source code
 
complete_roles(self, text, line, start_index, end_index) source code
 
roles_autocomplete(self, text, line, start_index, end_index)
Return full list of roles
source code
 
do_start_role(self, role)
Start a role...
source code
 
complete_start_role(self, text, line, start_index, end_index) source code
 
do_restart_role(self, role)
Restart a role...
source code
 
complete_restart_role(self, text, line, start_index, end_index) source code
 
do_stop_role(self, role)
Stop a role...
source code
 
complete_stop_role(self, text, line, start_index, end_index) source code
 
do_stop_cluster(self, cluster)
Completely stop the cluster...
source code
 
complete_stop_cluster(self, text, line, start_index, end_index) source code
 
do_start_cluster(self, cluster)
Start the cluster...
source code
 
complete_start_cluster(self, text, line, start_index, end_index) source code
 
do_version(self, cluster=None)
Obtain cluster CDH version...
source code
 
complete_version(self, text, line, start_index, end_index) source code
 
complete_status(self, text, line, start_index, end_index) source code

Inherited from cmd.Cmd: __init__, cmdloop, columnize, complete, complete_help, completedefault, completenames, default, do_help, get_names, onecmd, parseline, postcmd, postloop, precmd, print_topics

Class Variables [hide private]
  prompt = 'cloudera> '
  intro = 'Welcome to the Cloudera Manager Console\nSelect a clu...
  doc_header = 'Cloudera Manager Commands'
  undoc_header = 'Other Commands'
  CACHED_ROLES = {}
  CACHED_SERVICES = None
  CACHED_CLUSTERS = None

Inherited from cmd.Cmd: doc_leader, identchars, lastcmd, misc_header, nohelp, ruler, use_rawinput

Properties [hide private]
  cluster
Method Details [hide private]

preloop(self)

source code 

Checks if the cluster was pre-defined

Overrides: cmd.Cmd.preloop

emptyline(self)

source code 

Called each time a user hits enter, by default it will redo the last command, this is an extension so it does nothing.

Overrides: cmd.Cmd.emptyline

do_status(self, service)

source code 

List all services on the cluster
Usage:
    > status

do_log(self, role)

source code 

Download log file for role
Usage:
    > log <role>    Download log

do_stdout(self, role)

source code 

Download stdout file for role
Usage:
    > stdout <role>     Download stdout

do_stderr(self, role)

source code 

Download stderr file for role
Usage:
    > stderr <role>     Download stderr

do_start_service(self, service)

source code 

Start a service
Usage:
    > start_service <service>

do_restart_service(self, service)

source code 

Restart a service
Usage:
    > restart_service <service>

do_stop_service(self, service)

source code 

Stop a service
Usage:
    > stop_service <service>

do_use(self, cluster)

source code 

Connect to Cluster
Usage:
    > use <cluster>

do_roles(self, service)

source code 

Role information
Usage:
    > roles <servicename>   Display role information for service
    > roles all             Display all role information for cluster

do_start_role(self, role)

source code 

Start a role
Usage:
    > start_role <role>     Restarts this role

do_restart_role(self, role)

source code 

Restart a role
Usage:
    > restart_role <role>   Restarts this role

do_stop_role(self, role)

source code 

Stop a role
Usage:
    > stop_role <role>  Stops this role

do_stop_cluster(self, cluster)

source code 

Completely stop the cluster
Usage:
    > stop_cluster <cluster>

do_start_cluster(self, cluster)

source code 

Start the cluster
Usage:
    > start_cluster <cluster>

do_version(self, cluster=None)

source code 

Obtain cluster CDH version
Usage:
    > version
    or
    > version <cluster>


Class Variable Details [hide private]

intro

Value:
'''Welcome to the Cloudera Manager Console
Select a cluster using \'show clusters\' and \'use\''''

Property Details [hide private]

cluster

Get Method:
unreachable.cluster(self)