1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-03 17:13:17 +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(); int alarmID = calAlarm.getAlarmID();
Oam oam; Oam oam;
@@ -299,7 +299,7 @@ void ALARMManager::processAlarmReport (Alarm& calAlarm)
MessageLog ml(lid); MessageLog ml(lid);
Message msg; Message msg;
Message::Args args; Message::Args args;
args.add("processAlarmReport Called"); args.add("configAlarm Called");
msg.format(args); msg.format(args);
ml.logDebugMessage(msg); ml.logDebugMessage(msg);
} }
@@ -438,32 +438,18 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
else else
processName = repProcessName; processName = repProcessName;
//send request to ProcMgr to be processed Alarm calAlarm;
ByteStream msg1;
msg1 << (ByteStream::byte) REQUEST; calAlarm.setAlarmID (alarmID);
msg1 << oam::PROCESSALARM; calAlarm.setComponentID (componentID);
msg1 << (ByteStream::byte) alarmID; calAlarm.setState (state);
msg1 << (std::string) componentID; calAlarm.setSname (ModuleName);
msg1 << (ByteStream::byte) state; calAlarm.setPname (processName);
msg1 << (std::string) ModuleName; calAlarm.setPid (pid);
msg1 << (std::string) processName; calAlarm.setTid (tid);
msg1 << (ByteStream::byte) pid;
msg1 << (ByteStream::byte) tid;
try // Get alarm configuration
{ 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 {
configAlarm (calAlarm); configAlarm (calAlarm);
} catch (runtime_error& e) } catch (runtime_error& e)
{ {
@@ -476,7 +462,6 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
msg.format(args); msg.format(args);
ml.logErrorMessage(msg); ml.logErrorMessage(msg);
} }
*/
return; return;
#endif //SKIP_ALARM #endif //SKIP_ALARM

View File

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

View File

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