1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-29 03:22:01 +03:00
This commit is contained in:
David Hill
2016-12-20 15:47:27 -06:00
parent 52890e97a1
commit 7ade71eb0c
4 changed files with 242 additions and 242 deletions

View File

@@ -176,7 +176,7 @@ bool waitForStop()
//------------------------------------------------------------------------------
void handleSigTerm(int i)
{
std::cout << "Received SIGTERM to terminate MariaDB Columnstore Console..." << std::endl;
std::cout << "Received SIGTERM to terminate MariaDB ColumnStore Console..." << std::endl;
}
@@ -336,9 +336,9 @@ int main(int argc, char *argv[])
}
else
{
cout << endl << "MariaDB Columnstore Admin Console" << endl;
cout << endl << "MariaDB ColumnStore Admin Console" << endl;
cout << " enter 'help' for list of commands" << endl;
cout << " enter 'exit' to exit the MariaDB Columnstore Command Console" << endl;
cout << " enter 'exit' to exit the MariaDB ColumnStore Command Console" << endl;
cout << " use up/down arrows to recall commands" << endl << endl;
// output current active alarm stats
@@ -707,7 +707,7 @@ int processCommand(string* arguments)
// close the log file
writeLog("End of a command session!!!");
logFile.close();
cout << "Exiting the MariaDB Columnstore Admin Console" << endl;
cout << "Exiting the MariaDB ColumnStore Admin Console" << endl;
exit (0);
}
@@ -2091,7 +2091,7 @@ int processCommand(string* arguments)
break;
}
cout << endl << "This command stops the processing of applications on all Modules within the MariaDB Columnstore System" << endl;
cout << endl << "This command stops the processing of applications on all Modules within the MariaDB ColumnStore System" << endl;
try
{
@@ -2208,7 +2208,7 @@ int processCommand(string* arguments)
bool bDBRMReady = dbrm.isDBRMReady();
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
cout << endl << "This command stops the processing of applications on all Modules within the MariaDB Columnstore System" << endl;
cout << endl << "This command stops the processing of applications on all Modules within the MariaDB ColumnStore System" << endl;
try
{
@@ -2310,7 +2310,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1";
system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) {
cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl;
cout << endl << "ERROR: Stopping MariaDB ColumnStore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl;
}
}
else
@@ -2355,7 +2355,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1";
system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) {
cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl;
cout << endl << "ERROR: Stopping MariaDB ColumnStore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl;
break;
}
}
@@ -2451,7 +2451,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1";
system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) {
cout << endl << "ERROR: Restart MariaDB Columnstore Service failure, check /tmp/cc-restart.pdsh. exit..." << endl;
cout << endl << "ERROR: Restart MariaDB ColumnStore Service failure, check /tmp/cc-restart.pdsh. exit..." << endl;
break;
}
}
@@ -2670,7 +2670,7 @@ int processCommand(string* arguments)
cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1";
system(cmd.c_str());
if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) {
cout << endl << "ERROR: Restart MariaDB Columnstore Service failue, check /tmp/cc-restart.pdsh. exit..." << endl;
cout << endl << "ERROR: Restart MariaDB ColumnStore Service failue, check /tmp/cc-restart.pdsh. exit..." << endl;
break;
}
}
@@ -3357,7 +3357,7 @@ int processCommand(string* arguments)
if ( MySQLRep == "y" && MySQLPasswordConfig == oam::UnassignedName ) {
cout << endl;
string prompt = "MariaDB Columnstore Replication is enabled, is there a 'MariaDB Columnstore' Password configured in " + HOME + "/.my.cnf (y,n): ";
string prompt = "MariaDB ColumnStore Replication is enabled, is there a 'MariaDB ColumnStore' Password configured in " + HOME + "/.my.cnf (y,n): ";
MySQLPasswordConfig = dataPrompt(prompt);
}
@@ -3525,7 +3525,7 @@ int processCommand(string* arguments)
string configFileName;
oam.getSystemConfig("SystemLogConfigFile", configFileName);
cout << endl << "MariaDB Columnstore System Log Configuration Data" << endl << endl;
cout << endl << "MariaDB ColumnStore System Log Configuration Data" << endl << endl;
cout << "System Logging Configuration File being used: " << configFileName << endl << endl;
@@ -3846,7 +3846,7 @@ int processCommand(string* arguments)
BRM::DBRM dbrm;
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
cout << endl << "This command suspends the DDL/DML writes to the MariaDB Columnstore Database" << endl;
cout << endl << "This command suspends the DDL/DML writes to the MariaDB ColumnStore Database" << endl;
try
{
@@ -3927,7 +3927,7 @@ int processCommand(string* arguments)
break;
}
// stop writes to MariaDB Columnstore Database
// stop writes to MariaDB ColumnStore Database
oam.SuspendWrites(gracefulTemp, ackTemp);
}
catch (exception& e)
@@ -3945,11 +3945,11 @@ int processCommand(string* arguments)
case 33: // resumeDatabaseWrites
{
if ( arguments[1] != "y" ) {
if (confirmPrompt("This command resumes the DDL/DML writes to the MariaDB Columnstore Database"))
if (confirmPrompt("This command resumes the DDL/DML writes to the MariaDB ColumnStore Database"))
break;
}
// resume writes to MariaDB Columnstore Database
// resume writes to MariaDB ColumnStore Database
try{
SystemProcessStatus systemprocessstatus;
@@ -3974,7 +3974,7 @@ int processCommand(string* arguments)
}
}
oam.setSystemStatus(ACTIVE);
cout << endl << "Resume MariaDB Columnstore Database Writes Request successfully completed" << endl;
cout << endl << "Resume MariaDB ColumnStore Database Writes Request successfully completed" << endl;
}
catch (exception& e)
{
@@ -4536,7 +4536,7 @@ int processCommand(string* arguments)
}
catch(...)
{
cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB Columnstore System Configuration file" << endl;
cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB ColumnStore System Configuration file" << endl;
break;
}
@@ -4650,7 +4650,7 @@ int processCommand(string* arguments)
}
catch(...)
{
cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB Columnstore System Configuration file" << endl;
cout << "ERROR: Problem setting AmazonElasticModule in the MariaDB ColumnStore System Configuration file" << endl;
break;
}
}
@@ -4889,7 +4889,7 @@ int processCommand(string* arguments)
catch(...) {}
if ( MySQLRep == "y" ) {
string warning = "MariaDB Columnstore Replication Feature is already enabled";
string warning = "MariaDB ColumnStore Replication Feature is already enabled";
// confirm request
if (confirmPrompt(warning))
break;
@@ -4915,7 +4915,7 @@ int processCommand(string* arguments)
if ( MySQLPasswordConfig == oam::UnassignedName ) {
cout << endl;
string prompt = "Is there a 'MariaDB Columnstore' Password configured on the MariaDB Columnstore Front-end Modules in " + HOME + "/.my.cnf (y,n): ";
string prompt = "Is there a 'MariaDB ColumnStore' Password configured on the MariaDB ColumnStore Front-end Modules in " + HOME + "/.my.cnf (y,n): ";
MySQLPasswordConfig = dataPrompt(prompt);
}
@@ -4937,7 +4937,7 @@ int processCommand(string* arguments)
try
{
oam.enableMySQLRep(password);
cout << endl << " Successful Enabling of MariaDB Columnstore Replication " << endl << endl;
cout << endl << " Successful Enabling of MariaDB ColumnStore Replication " << endl << endl;
//display Primary UM Module / Master Node
string PrimaryUMModuleName;
@@ -4946,7 +4946,7 @@ int processCommand(string* arguments)
}
catch(...) {}
cout << " MariaDB Columnstore Replication Master Node is " << PrimaryUMModuleName << endl << endl;
cout << " MariaDB ColumnStore Replication Master Node is " << PrimaryUMModuleName << endl << endl;
}
catch (exception& e)
{
@@ -5596,7 +5596,7 @@ int processCommand(string* arguments)
if ( arguments[3] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command does a remove a module from the MariaDB Columnstore System";
string warning = "This command does a remove a module from the MariaDB ColumnStore System";
// confirm request
if (confirmPrompt(warning))
break;
@@ -5661,7 +5661,7 @@ int processCommand(string* arguments)
if ( arguments[2] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command does a stop and remove a module from the MariaDB Columnstore System";
string warning = "This command does a stop and remove a module from the MariaDB ColumnStore System";
// confirm request
if (confirmPrompt(warning))
break;
@@ -5869,7 +5869,7 @@ int processCommand(string* arguments)
catch(...) {}
if ( MySQLRep == "n" ) {
string warning = "MariaDB Columnstore Replication Feature is already disable";
string warning = "MariaDB ColumnStore Replication Feature is already disable";
// confirm request
if (confirmPrompt(warning))
break;
@@ -5883,7 +5883,7 @@ int processCommand(string* arguments)
if ( MySQLPasswordConfig == oam::UnassignedName ) {
cout << endl;
string prompt = "Is there a 'MariaDB Columnstore' Password configured on the MariaDB Columnstore Front-end Modules in " + HOME + "/.my.cnf (y,n): ";
string prompt = "Is there a 'MariaDB ColumnStore' Password configured on the MariaDB ColumnStore Front-end Modules in " + HOME + "/.my.cnf (y,n): ";
MySQLPasswordConfig = dataPrompt(prompt);
}
@@ -5905,7 +5905,7 @@ int processCommand(string* arguments)
try
{
oam.disableMySQLRep();
cout << endl << " Successful Disable of MariaDB Columnstore Replication " << endl;
cout << endl << " Successful Disable of MariaDB ColumnStore Replication " << endl;
}
catch (exception& e)
{
@@ -6662,7 +6662,7 @@ int processCommand(string* arguments)
{
// confirm request
if ( arguments[2] != "y" ) {
if (confirmPrompt("This command stops the processing of applications on a Module within the MariaDB Columnstore System"))
if (confirmPrompt("This command stops the processing of applications on a Module within the MariaDB ColumnStore System"))
break;
}
}
@@ -6788,7 +6788,7 @@ int processCommand(string* arguments)
// confirm request
if ( arguments[2] != "y" ) {
if (confirmPrompt("This command starts the processing of applications on a Module within the MariaDB Columnstore System"))
if (confirmPrompt("This command starts the processing of applications on a Module within the MariaDB ColumnStore System"))
break;
}
@@ -6934,7 +6934,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
// give warning for Process-Monitor
if ( arguments[1] == "ProcessManager" ) {
if (confirmPrompt("ProcessManager is the Interface for the Console and should only be removed as part of a MariaDB Columnstore Package installation"))
if (confirmPrompt("ProcessManager is the Interface for the Console and should only be removed as part of a MariaDB ColumnStore Package installation"))
break;
}
else
@@ -6942,7 +6942,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
if ( arguments[3] != "y" ) {
getFlags(arguments, gracefulTemp, ackTemp, suspendAnswer, bNeedsConfirm);
// confirm request
if (confirmPrompt("This command stops the processing of an application on a Module within the MariaDB Columnstore System"))
if (confirmPrompt("This command stops the processing of an application on a Module within the MariaDB ColumnStore System"))
break;
}
}
@@ -6997,7 +6997,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
if (arguments[3] != "y")
{
// confirm request
if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB Columnstore System"))
if (confirmPrompt("This command restarts the processing of an application on a Module within the MariaDB ColumnStore System"))
break;
}
@@ -7062,7 +7062,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
string password = arguments[1];
if ( arguments[2] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command stops the Processing of applications and reboots all modules within the MariaDB Columnstore System";
string warning = "This command stops the Processing of applications and reboots all modules within the MariaDB ColumnStore System";
// confirm request
if (confirmPrompt(warning))
break;
@@ -7154,7 +7154,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
// close the log file
writeLog("End of a command session!!!");
logFile.close();
cout << endl << "Exiting the MariaDB Columnstore Command Console" << endl;
cout << endl << "Exiting the MariaDB ColumnStore Command Console" << endl;
exit (0);
}
}
@@ -7185,7 +7185,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
string password = arguments[2];
if ( arguments[3] != "y") {
cout << endl << "!!!!! DESTRUCTIVE COMMAND !!!!!" << endl;
string warning = "This command reboots a node within the MariaDB Columnstore System";
string warning = "This command reboots a node within the MariaDB ColumnStore System";
// confirm request
if (confirmPrompt(warning))
break;
@@ -7224,7 +7224,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
// close the log file
writeLog("End of a command session!!!");
logFile.close();
cout << endl << "Exiting the MariaDB Columnstore Command Console" << endl;
cout << endl << "Exiting the MariaDB ColumnStore Command Console" << endl;
exit (0);
}
}
@@ -7258,7 +7258,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// confirm request
if (confirmPrompt("This command stops the dbrm processes within the MariaDB Columnstore System"))
if (confirmPrompt("This command stops the dbrm processes within the MariaDB ColumnStore System"))
break;
}
@@ -7292,7 +7292,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// confirm request
if (confirmPrompt("This command restarts the dbrm processes within the MariaDB Columnstore System"))
if (confirmPrompt("This command restarts the dbrm processes within the MariaDB ColumnStore System"))
break;
}
@@ -7326,7 +7326,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
}
catch(...)
{
cout << "ERROR: Problem getting systemStartupOffline from the MariaDB Columnstore System Configuration file" << endl;
cout << "ERROR: Problem getting systemStartupOffline from the MariaDB ColumnStore System Configuration file" << endl;
return 1;
}
@@ -7358,7 +7358,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
}
catch(...)
{
cout << "ERROR: Problem setting systemStartupOffline in the MariaDB Columnstore System Configuration file" << endl;
cout << "ERROR: Problem setting systemStartupOffline in the MariaDB ColumnStore System Configuration file" << endl;
exit(-1);
}
cout << endl << " Successful setting of systemStartupOffline to '" << systemStartupOffline << "'" << endl << endl;
@@ -7369,7 +7369,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// confirm request
if (confirmPrompt("This command stops the PrimProc processes within the MariaDB Columnstore System"))
if (confirmPrompt("This command stops the PrimProc processes within the MariaDB ColumnStore System"))
break;
}
@@ -7403,7 +7403,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// confirm request
if (confirmPrompt("This command restarts the PrimProc processes within the MariaDB Columnstore System"))
if (confirmPrompt("This command restarts the PrimProc processes within the MariaDB ColumnStore System"))
break;
}
@@ -7423,7 +7423,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// confirm request
if (confirmPrompt("This command stops the ExeMgr processes within the MariaDB Columnstore System"))
if (confirmPrompt("This command stops the ExeMgr processes within the MariaDB ColumnStore System"))
break;
}
@@ -7457,7 +7457,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
{
if ( arguments[1] != "y" ) {
// confirm request
if (confirmPrompt("This command restarts the ExeMgr processes within the MariaDB Columnstore System"))
if (confirmPrompt("This command restarts the ExeMgr processes within the MariaDB ColumnStore System"))
break;
}
@@ -7489,11 +7489,11 @@ int ProcessSupportCommand(int CommandID, std::string arguments[])
try
{
oam.distributeConfigFile(name);
cout << endl << " Successful Distribution of MariaDB Columnstore Config File" << endl << endl;
cout << endl << " Successful Distribution of MariaDB ColumnStore Config File" << endl << endl;
}
catch (exception& e)
{
cout << endl << "**** Distribution of MariaDB Columnstore Config File Failed : " << e.what() << endl;
cout << endl << "**** Distribution of MariaDB ColumnStore Config File Failed : " << e.what() << endl;
}
}
break;
@@ -8026,13 +8026,13 @@ void printSystemStatus()
if ( moduletypeconfig.ModuleCount > 1 )
{
if ( PrimaryUMModuleName != oam::UnassignedName )
cout << "Primary Front-End MariaDB Columnstore Module is '" << PrimaryUMModuleName << "'" << endl;
cout << "Primary Front-End MariaDB ColumnStore Module is '" << PrimaryUMModuleName << "'" << endl;
}
}
else
{
if ( PrimaryUMModuleName != oam::UnassignedName )
cout << "Primary Front-End MariaDB Columnstore Module is '" << PrimaryUMModuleName << "'" << endl;
cout << "Primary Front-End MariaDB ColumnStore Module is '" << PrimaryUMModuleName << "'" << endl;
}
}
@@ -8054,7 +8054,7 @@ void printSystemStatus()
catch(...) {}
if ( MySQLRep == "y" )
cout << "MariaDB Columnstore Replication Feature is enabled" << endl << endl;
cout << "MariaDB ColumnStore Replication Feature is enabled" << endl << endl;
}
catch (exception& e)
{
@@ -8117,7 +8117,7 @@ void printProcessStatus(std::string port)
}
}
cout << endl << "MariaDB Columnstore Process statuses" << endl << endl;
cout << endl << "MariaDB ColumnStore Process statuses" << endl << endl;
cout << "Process Module Status Last Status Change Process ID" << endl;
cout << "------------------ ------ --------------- ------------------------ ----------" << endl;
try