0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
Hypertable::ClusterCommandInterpreter Class Reference

Executes interactive cluster tool commands. More...

#include <ClusterCommandInterpreter.h>

Inheritance diagram for Hypertable::ClusterCommandInterpreter:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::ClusterCommandInterpreter:
Collaboration graph
[legend]

Public Member Functions

 ClusterCommandInterpreter (const string &script)
 Constructor. More...
 
int execute_line (const string &line) override
 Executes a command line. More...
 
- Public Member Functions inherited from Hypertable::CommandInterpreter
 CommandInterpreter ()
 
void set_timestamp_output_format (const String &format)
 
void set_silent (bool silent)
 
void set_test_mode (bool mode)
 
void set_interactive_mode (bool mode)
 
bool silent_mode ()
 
bool test_mode ()
 
bool normal_mode ()
 
int timestamp_output_format ()
 

Private Attributes

string m_command_script
 Pathname of command script. More...
 

Additional Inherited Members

- Public Types inherited from Hypertable::CommandInterpreter
enum  { TIMESTAMP_FORMAT_DEFAULT, TIMESTAMP_FORMAT_NANOS }
 
- Protected Attributes inherited from Hypertable::CommandInterpreter
int m_timestamp_output_format
 
bool m_silent
 
bool m_test_mode
 
bool m_interactive
 

Detailed Description

Executes interactive cluster tool commands.

Definition at line 42 of file ClusterCommandInterpreter.h.

Constructor & Destructor Documentation

ClusterCommandInterpreter::ClusterCommandInterpreter ( const string &  script)

Constructor.

Parameters
scriptAbsolute pathname of command script

Definition at line 158 of file ClusterCommandInterpreter.cc.

Member Function Documentation

int ClusterCommandInterpreter::execute_line ( const string &  line)
overridevirtual

Executes a command line.

This function executes the command or task contained in line which was read from the interactive shell. It interprets commands or tasks in one of the formats described in the table below.

Format Description
command Runs command on all roles by invoking the with function of the command script and passing in all for the target roles
on <hostspec> command Runs command on all the hosts specified by <hostspec> (see HostSpecification) by launching the ht_ssh tool
with <role-list> command Runs command by invoking the with function of the command script and passing in <role-list> (comma-separated, no spaces) for the target roles
!task Runs task by invoking the task function of the command script.
Parameters
lineCommand or task specification (see table)
Returns
Command return code

Implements Hypertable::CommandInterpreter.

Definition at line 164 of file ClusterCommandInterpreter.cc.

Member Data Documentation

string Hypertable::ClusterCommandInterpreter::m_command_script
private

Pathname of command script.

Definition at line 92 of file ClusterCommandInterpreter.h.


The documentation for this class was generated from the following files: