Executes interactive cluster tool commands. More...
#include <ClusterCommandInterpreter.h>
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 |
Executes interactive cluster tool commands.
Definition at line 42 of file ClusterCommandInterpreter.h.
ClusterCommandInterpreter::ClusterCommandInterpreter | ( | const string & | script | ) |
Constructor.
script | Absolute pathname of command script |
Definition at line 158 of file ClusterCommandInterpreter.cc.
|
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. |
line | Command or task specification (see table) |
Implements Hypertable::CommandInterpreter.
Definition at line 164 of file ClusterCommandInterpreter.cc.
|
private |
Pathname of command script.
Definition at line 92 of file ClusterCommandInterpreter.h.