1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-02 06:13:16 +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);
} }
@@ -437,33 +437,19 @@ void ALARMManager::sendAlarmReport (const char* componentID, int alarmID, int st
} }
else else
processName = repProcessName; processName = repProcessName;
Alarm calAlarm;
calAlarm.setAlarmID (alarmID);
calAlarm.setComponentID (componentID);
calAlarm.setState (state);
calAlarm.setSname (ModuleName);
calAlarm.setPname (processName);
calAlarm.setPid (pid);
calAlarm.setTid (tid);
//send request to ProcMgr to be processed // Get alarm configuration
ByteStream msg1; try {
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;
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

@@ -75,8 +75,6 @@ public:
const int state, const int state,
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;