1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-31 18:30:33 +03:00

put the alarm abck like develop

This commit is contained in:
David Hill
2016-12-06 19:43:27 +00:00
parent 506aada81b
commit 9b58b97ebb
3 changed files with 18 additions and 35 deletions

View File

@@ -283,12 +283,12 @@ void processAlarm(const Alarm& calAlarm)
}
/*****************************************************************************************
* @brief processAlarmReport
* @brief configAlarm
*
* purpose: Process Alarm Report
* purpose: Get Config Data for Incoming alarm
*
*****************************************************************************************/
void ALARMManager::processAlarmReport (Alarm& calAlarm)
void configAlarm (Alarm& calAlarm)
{
int alarmID = calAlarm.getAlarmID();
Oam oam;
@@ -299,7 +299,7 @@ void ALARMManager::processAlarmReport (Alarm& calAlarm)
MessageLog ml(lid);
Message msg;
Message::Args args;
args.add("processAlarmReport Called");
args.add("configAlarm Called");
msg.format(args);
ml.logDebugMessage(msg);
}
@@ -438,32 +438,18 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
else
processName = repProcessName;
//send request to ProcMgr to be processed
ByteStream msg1;
Alarm calAlarm;
msg1 << (ByteStream::byte) REQUEST;
msg1 << oam::PROCESSALARM;
msg1 << (ByteStream::byte) alarmID;
msg1 << (std::string) componentID;
msg1 << (ByteStream::byte) state;
msg1 << (std::string) ModuleName;
msg1 << (std::string) processName;
msg1 << (ByteStream::byte) pid;
msg1 << (ByteStream::byte) tid;
calAlarm.setAlarmID (alarmID);
calAlarm.setComponentID (componentID);
calAlarm.setState (state);
calAlarm.setSname (ModuleName);
calAlarm.setPname (processName);
calAlarm.setPid (pid);
calAlarm.setTid (tid);
try
{
//send the msg to Process Manager
MessageQueueClient procmgr("ProcMgr");
procmgr.write(msg1);
procmgr.shutdown();
}
catch (...)
{}
//There's other reasons, but this is the most likely...
/* try {
// Get alarm configuration
try {
configAlarm (calAlarm);
} catch (runtime_error& e)
{
@@ -476,7 +462,6 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
msg.format(args);
ml.logErrorMessage(msg);
}
*/
return;
#endif //SKIP_ALARM

View File

@@ -76,8 +76,6 @@ public:
std::string repModuleName = "",
std::string repProcessName = "");
EXPORT void processAlarmReport ( Alarm& calAlarm );
/** @brief return active alarm list
*

View File

@@ -2628,7 +2628,7 @@ void processMSG(messageqcpp::IOSocket* cfIos)
break;
}
/*
case PROCESSALARM:
{
log.writeLog(__LINE__, "MSG RECEIVED: Process Alarm Message");
@@ -2665,7 +2665,7 @@ void processMSG(messageqcpp::IOSocket* cfIos)
break;
}
*/
default:
log.writeLog(__LINE__, "MSG RECEIVED: Invalid type" );
break;