1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-30 14:21:11 +03:00

Merge pull request #90 from mariadb-corporation/1.0.6.1

1.0.6.1
This commit is contained in:
benthompson15
2017-01-11 12:01:35 -06:00
committed by GitHub
16 changed files with 654 additions and 958 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);
}
@@ -2148,7 +2148,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
{
@@ -2265,7 +2265,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
{
@@ -2367,7 +2367,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
@@ -2412,7 +2412,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;
}
}
@@ -2508,7 +2508,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;
}
}
@@ -2727,7 +2727,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;
}
}
@@ -3414,7 +3414,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);
}
@@ -3582,7 +3582,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;
@@ -3903,7 +3903,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
{
@@ -3984,7 +3984,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)
@@ -4002,11 +4002,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;
@@ -4031,7 +4031,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)
{
@@ -4593,7 +4593,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;
}
@@ -4707,7 +4707,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;
}
}
@@ -4920,16 +4920,6 @@ int processCommand(string* arguments)
}
catch(...) {}
if ( cloud == "amazon-vpc" )
{
string AmazonSubNetID = oam::UnassignedName;
try{
oam.getSystemConfig("AmazonSubNetID", AmazonSubNetID);
cout << "AmazonSubNetID = " << AmazonSubNetID << endl;
}
catch(...) {}
}
}
cout << endl;
@@ -4946,7 +4936,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;
@@ -4972,7 +4962,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);
}
@@ -4994,7 +4984,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;
@@ -5003,7 +4993,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)
{
@@ -5626,7 +5616,7 @@ int processCommand(string* arguments)
if ( localModule != parentOAMModule ) {
// exit out since not on Parent OAM Module
cout << endl << "**** addModule Failed : only should be run on the Parent OAM Module, which is '" << parentOAMModule << "'" << endl;
cout << endl << "**** removeModule Failed : only should be run on the Parent OAM Module, which is '" << parentOAMModule << "'" << endl;
break;
}
@@ -5653,7 +5643,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;
@@ -5718,7 +5708,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;
@@ -5926,7 +5916,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;
@@ -5940,7 +5930,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);
}
@@ -5962,7 +5952,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)
{
@@ -6719,7 +6709,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;
}
}
@@ -6845,7 +6835,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;
}
@@ -6991,7 +6981,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
@@ -6999,7 +6989,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;
}
}
@@ -7054,7 +7044,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;
}
@@ -7119,7 +7109,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;
@@ -7211,7 +7201,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);
}
}
@@ -7242,7 +7232,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;
@@ -7281,7 +7271,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);
}
}
@@ -7315,7 +7305,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;
}
@@ -7349,7 +7339,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;
}
@@ -7383,7 +7373,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;
}
@@ -7415,7 +7405,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;
@@ -7426,7 +7416,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;
}
@@ -7460,7 +7450,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;
}
@@ -7480,7 +7470,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;
}
@@ -7514,7 +7504,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;
}
@@ -7546,11 +7536,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;
@@ -8083,13 +8073,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;
}
}
@@ -8111,7 +8101,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)
{
@@ -8174,7 +8164,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