hce-node application
1.4.3
HCE Hierarchical Cluster Engine node application
Main Page
Namespaces
Classes
Files
File List
File Members
hce-node application
HCE project node model
Namespaces
Classes
Files
File List
sources
src
utils
algorithms
applicationFramework
asmXMLParser
base64
coreDumpChecker
DRCE
src
DRCEAsyncTasksQueue.cpp
DRCEAsyncTasksQueue.hpp
DRCEAvgCounts.cpp
DRCEAvgCounts.hpp
DRCEAvgCountsConverter.cpp
DRCEAvgCountsConverter.hpp
DRCECleanupTask.cpp
DRCECleanupTask.hpp
DRCECommonList.hpp
DRCECommonTask.cpp
DRCECommonTask.hpp
DRCEDefaultJSON.cpp
DRCEDefaultJSON.hpp
DRCEEncodeDecodeBase64.cpp
DRCEEncodeDecodeBase64.hpp
DRCEError.hpp
DRCEFileBuilder.cpp
DRCEFileBuilder.hpp
DRCEFileExtractor.cpp
DRCEFileExtractor.hpp
DRCEFilesList.cpp
DRCEFilesList.hpp
DRCEFileStream.cpp
DRCEFileStream.hpp
DRCEFunctionalObject.cpp
DRCEFunctionalObject.hpp
DRCEFunctionalObjectBase.cpp
DRCEFunctionalObjectBase.hpp
DRCEInputJsonMessage.cpp
DRCEInputJsonMessage.hpp
DRCEJsonMessageConst.hpp
DRCEListAllTasks.cpp
DRCEListAllTasks.hpp
DRCEMessageConst.hpp
DRCENodeOptions.cpp
DRCENodeOptions.hpp
DRCENotificationExecutor.cpp
DRCENotificationExecutor.hpp
DRCEOutputJsonMessage.cpp
DRCEOutputJsonMessage.hpp
DRCEProcessData.cpp
DRCEProcessData.hpp
DRCEReadProcessData.cpp
DRCEReadProcessData.hpp
DRCEResourceExtractor.cpp
DRCEResourceExtractor.hpp
DRCEResourceLimits.cpp
DRCEResourceLimits.hpp
DRCEResourceLimitsChecker.cpp
DRCEResourceLimitsChecker.hpp
DRCEResourceMonitor.cpp
DRCEResourceMonitor.hpp
DRCEResourceUsage.cpp
DRCEResourceUsage.hpp
DRCEResultData.cpp
DRCEResultData.hpp
DRCEResultDataSerializator.cpp
DRCEResultDataSerializator.hpp
DRCESessionOptions.cpp
DRCESessionOptions.hpp
DRCEStatVariables.cpp
DRCEStatVariables.hpp
DRCEStatVariablesConverter.cpp
DRCEStatVariablesConverter.hpp
DRCESubtasksList.hpp
DRCETaskFactory.cpp
DRCETaskFactory.hpp
DRCETaskRequest.hpp
DRCETaskRequestCheckState.cpp
DRCETaskRequestCheckState.hpp
DRCETaskRequestCheckStateExecutor.cpp
DRCETaskRequestCheckStateExecutor.hpp
DRCETaskRequestDeleteData.cpp
DRCETaskRequestDeleteData.hpp
DRCETaskRequestDeleteDataExecutor.cpp
DRCETaskRequestDeleteDataExecutor.hpp
DRCETaskRequestExecutor.cpp
DRCETaskRequestExecutor.hpp
DRCETaskRequestExecutorFactory.cpp
DRCETaskRequestExecutorFactory.hpp
DRCETaskRequestFactory.cpp
DRCETaskRequestFactory.hpp
DRCETaskRequestGetData.cpp
DRCETaskRequestGetData.hpp
DRCETaskRequestGetDataExecutor.cpp
DRCETaskRequestGetDataExecutor.hpp
DRCETaskRequestSetExecute.cpp
DRCETaskRequestSetExecute.hpp
DRCETaskRequestSetExecuteExecutor.cpp
DRCETaskRequestSetExecuteExecutor.hpp
DRCETaskRequestTerminate.cpp
DRCETaskRequestTerminate.hpp
DRCETaskRequestTerminateExecutor.cpp
DRCETaskRequestTerminateExecutor.hpp
DRCETaskShellHost.cpp
DRCETaskShellHost.hpp
DRCETasksQueue.cpp
DRCETasksQueue.hpp
DRCETaskSsh.cpp
DRCETaskSsh.hpp
tests
exec
HCECSM
jsonObjExtractor
kvdb
messageStream
reduceAdditionCore
reduceCore
reduceDRCE
reduceHandler
reduceSphinx
refine
serializable
sphinx
types
xmlCleaner
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
DRCEMessageConst.hpp
Go to the documentation of this file.
1
14
#ifndef DRCE_MESSAGE_CONST_HPP
15
#define DRCE_MESSAGE_CONST_HPP
16
17
#include <vector>
18
#include <string>
19
20
namespace
HCE
21
{
22
namespace
drce
23
{
24
namespace
message_const
25
{
26
//-----------------------------------------------------------------------------
27
enum
28
{
29
CREATE_DEFAULT_JSON
=0,
30
SERIALIZATION_OUTPUT_JSON_MESSAGE_ERROR
,
31
EMPTY_COMMAND_LINE
,
32
EXECUTE_COMMAND_FAIL
,
33
UNKNOWN_SESSION_TYPE
,
34
OBJECT_INSTANCE_WAS_NOT_CREATED
,
35
EMPTY_OBJECT_INSTANCE
,
36
SET_HOME_DIR
,
37
ERROR
,
38
ERROR_MSG
,
39
ERROR_CODE
,
40
COMMAND
,
41
CREATE_FILE
,
42
READ_FILE
,
43
DELETE_FILE
,
44
ERROR_READ_DATA_FILE
,
45
ERROR_READ_REQUEST_FILE
,
46
NOT_EXISTS_DATA_FILE
,
47
NOT_EXISTS_REQUEST_FILE
,
48
ERROR_EXECUTE_NOTIFICATION
,
49
BAD_FILE_CONTENT
,
50
SHELL_SCRIPT_NOT_EXIST
,
51
SHELL_SCRIPT_CANNOT_EXECUTE
,
52
WRONG_TYPE_TASK_REQUEST
,
53
WRONG_TYPE_THREAD_MODE
,
54
EXECUTE_SHELL_HOST_COMMAND_FAIL
,
55
SHELL_HOST_COMMAND_RETURN_ERROR
,
56
WRONG_TYPE_REMOTE_EXCUTION
,
57
TASK_CONTINUES_TO_RUN
,
58
WRONG_CHECK_TYPE
,
59
WRONG_FETCH_TYPE
,
60
WRONG_ALGORITHM_TYPE
,
61
BAD_COMMAND_PARAMS
,
62
BAD_TASK_ID
,
63
DATA_NOT_RANGE
,
64
SEARCH_TASK
,
65
CANCEL_TASK
,
66
INVALID_PID_PROCESS
,
67
TASK_NOT_FOUND
,
68
TASK_DATA_NOT_FOUND
,
69
PROCESS_WAS_NOT_STOPPED
,
70
CHANGE_STATE
,
71
TASK_TIME_EXPIRED
,
72
TASK_CANCELED
,
73
EXCEEDED_CPU_LOAD
,
74
EXCEEDED_IOWAIT_LOAD
,
75
PRESENT_LOADING
,
76
EXCEEDED_DISK_SPACE
,
77
USAGE
,
78
FREE
,
79
BYTES
,
80
PERCENTS
,
81
EXCEEDED_RESOURCE_RAM
,
82
EXCEEDED_VIRTUAL_RAM
,
83
EXCEEDED_PROCESSES_COUNT
,
84
EXCEEDED_THREADS_COUNT
,
85
EXCEEDED_USAGE_IOWAIT_LOAD
,
86
EXCEEDED_USAGE_VIRTUAL_RAM
,
87
EXCEEDED_USAGE_RESOURCE_RAM
,
88
EXCEEDED_USAGE_DISK_SPACE
,
89
CLEANUP_BAD_FLAG
,
90
PID
,
91
SUBTASK_EXECUTION_ERROR
,
92
START_CLEANUP_TASK_ERROR
,
93
EMPTY_FILE_CONTENT
,
94
GET_CURRENT_TASKS_QUEUE_ERROR
,
95
GET_LIST_ALL_TASKS_ERROR
,
96
GET_RESOURCE_USAGE_ERROR
,
97
TASK_BUSY
,
98
TARGET_CLIENTS_NOT_AVAILABLE
,
99
NODE_NOT_SUPPORTED
,
100
DATA_FILE_IS_EMPTY
,
101
SET_ENVIRONMENT_ERROR
,
102
DUMP_RESOURCE_MONITOR_FAIL
,
103
RESTORE_RESOURCE_MONITOR_FAIL
104
};
105
106
const
char
delimiter
=
':'
;
107
const
char
space
=
' '
;
108
const
char
point
=
'.'
;
109
110
const
std::string
badJsonFormat
=
"Bad json format. Not found field: "
;
111
const
std::string
badJsonFieldContent
=
"Bad json format. Bad content of field: "
;
112
113
const
std::string
createDefaultJson
=
"CREATE DefaultJSON"
;
114
const
std::string
serializationOutputJsonMessageError
=
"Serialization error of output json message"
;
115
const
std::string
emptyCommandLine
=
"Empty command line"
;
116
const
std::string
executeCommandFail
=
"Execute command fail"
;
117
const
std::string
unknownSessionType
=
"Unknown session type"
;
118
const
std::string
objectInstanceWasNotCreated
=
"Object instance was not created"
;
119
const
std::string
emptyObjectInstance
=
"Empty object instance"
;
120
const
std::string
setHomeDir
=
"Set HomeDir"
;
121
const
std::string
error
=
"Error"
;
122
const
std::string
errorMsg
=
"ERROR_MSG"
;
123
const
std::string
errorCode
=
"ERROR_CODE"
;
124
const
std::string
command
=
"COMMAND"
;
125
126
const
std::string
createFileFail
=
"Create file fail"
;
127
const
std::string
readFileFail
=
"Read file fail"
;
128
const
std::string
deleteFileFail
=
"Delete file fail"
;
129
const
std::string
errorReadDataFile
=
"Error read data file"
;
130
const
std::string
errorReadRequestFile
=
"Error read request file"
;
131
const
std::string
dataFileNotExists
=
"File of data not exists"
;
132
const
std::string
requestFileNotExists
=
"File of request not exists"
;
133
const
std::string
badFileContent
=
"Bad file's content"
;
134
const
std::string
shellScriptNotExist
=
"Shell script not exist"
;
135
const
std::string
shellScriptCannotExecute
=
"Shell script cannot execute"
;
136
137
const
std::string
wrongTypeTaskRequest
=
"Wrong type of task request"
;
138
const
std::string
wrongTypeThreadMode
=
"Wrong type of thread mode"
;
139
const
std::string
executeShellHostCommandFail
=
"Execute Shell Host command fail"
;
140
const
std::string
shellHostCommandReturnError
=
"Shell Host command return error"
;
141
const
std::string
wrongTypeRemoteExecution
=
"Wrong type of remote execution"
;
142
const
std::string
wrongCheckType
=
"Wrong check type for return status information"
;
143
const
std::string
wrongFetchType
=
"Wrong fetch type for get data request"
;
144
const
std::string
wrongAlgorithmType
=
"Wrong algorithm type for terminate task request"
;
145
const
std::string
badCommandParams
=
"Bad command params"
;
146
const
std::string
badTaskId
=
"Bad task ID"
;
147
const
std::string
dataNotRange
=
"Task Id not in range"
;
148
const
std::string
searchTask
=
"Search task fail"
;
149
const
std::string
cancelTask
=
"Cancel task fail"
;
150
const
std::string
invalidPidProcess
=
"Invalid pid process"
;
151
const
std::string
readDataFile
=
"Read data file fail"
;
152
const
std::string
errorExecuteNotification
=
"Error execute notification"
;
153
154
const
std::string
taskContinuesToRun
=
"Task continues to run"
;
155
const
std::string
taskNotFound
=
"Task not found"
;
156
const
std::string
taskDataNotFound
=
"Task data not found"
;
157
const
std::string
processWasNotStopped
=
"Process wasn't stopped"
;
158
const
std::string
changeState
=
"Change state"
;
159
const
std::string
taskTimeExpired
=
"Task's time expired"
;
160
const
std::string
taskCanceled
=
"Task canceled"
;
161
const
std::string
exceededCpuLoad
=
"Exceeded max allowed value of CPU load"
;
162
const
std::string
exceededIOWaitLoad
=
"Exceeded max allowed value of iowait load"
;
163
const
std::string
presentLoading
=
"Present loading is"
;
164
const
std::string
exceededDiskSpace
=
"Exceeded min size of disk space"
;
165
const
std::string
usage
=
"Usage"
;
166
const
std::string
free
=
"Free"
;
167
const
std::string
bytes
=
"bytes"
;
168
const
std::string
percents
=
"percents"
;
169
const
std::string
exceededResourceRAM
=
"Exceeded min size of resource RAM"
;
170
const
std::string
exceededVirtualRAM
=
"Exceeded min size of virtual RAM"
;
171
const
std::string
exceededProcessesCount
=
"Exceeded max number of processes."
;
172
const
std::string
exceededThreadsCount
=
"Exceeded max number of threads"
;
173
const
std::string
exceededUsageIOWaitLoad
=
"Exceeded max allowed value of iowait load during execution"
;
174
const
std::string
exceededUsageVirtualRAM
=
"Exceeded max allowed value of virtual RAM usage during execution"
;
175
const
std::string
exceededUsageResourceRAM
=
"Exceeded max allowed value of resource RAM usage during execution"
;
176
const
std::string
exceededUsageDiskSpace
=
"Exceeded max allowed value of disk space usage during execution"
;
177
const
std::string
cleanupBadFlag
=
"Operation cleanup has bad flag"
;
178
const
std::string
pid
=
"PID"
;
179
const
std::string
subtaskExecutionError
=
"Subtask execution error"
;
180
const
std::string
startCleanupTaskError
=
"Start cleanup task error"
;
181
const
std::string
emptyFileContent
=
"Empty file content"
;
182
const
std::string
getCurrentTasksQueueError
=
"Get current tasks queue error"
;
183
const
std::string
getListAllTasksError
=
"Get list all tasks error"
;
184
const
std::string
getResourceUsageError
=
"Get resource usage error"
;
185
const
std::string
taskBusy
=
"Task is busy"
;
186
187
const
std::string
targetClientsNotAvailable
=
"No target node clients available"
;
188
const
std::string
nodeNotSupported
=
"Node mode not supported"
;
189
const
std::string
nodeHasNotEnoughResources
=
"Chosen node has not enough resources for usage"
;
190
191
const
std::string
dataFileIsEmpty
=
"Read empty data file"
;
192
const
std::string
setEnvironmentError
=
"Set mandatory environment error"
;
193
const
std::string
dumpResourceMonitorFail
=
"Dump of resource monitor failed"
;
194
const
std::string
restoreResourceMonitorFail
=
"Restore of resource monitor failed"
;
195
196
197
const
std::vector<std::pair<unsigned int, std::string> >
messages
=
198
{
199
{
CREATE_DEFAULT_JSON
,
createDefaultJson
},
200
{
SERIALIZATION_OUTPUT_JSON_MESSAGE_ERROR
,
serializationOutputJsonMessageError
},
201
{
EMPTY_COMMAND_LINE
,
emptyCommandLine
},
202
{
EXECUTE_COMMAND_FAIL
,
executeCommandFail
},
203
{
UNKNOWN_SESSION_TYPE
,
unknownSessionType
},
204
{
OBJECT_INSTANCE_WAS_NOT_CREATED
,
objectInstanceWasNotCreated
},
205
{
EMPTY_OBJECT_INSTANCE
,
emptyObjectInstance
},
206
{
SET_HOME_DIR
,
setHomeDir
},
207
{
ERROR
,
error
},
208
{
ERROR_MSG
,
errorMsg
},
209
{
ERROR_CODE
,
errorCode
},
210
{
COMMAND
,
command
},
211
{
CREATE_FILE
,
createFileFail
},
212
{
READ_FILE
,
readFileFail
},
213
{
DELETE_FILE
,
deleteFileFail
},
214
{
ERROR_READ_DATA_FILE
,
errorReadDataFile
},
215
{
ERROR_READ_REQUEST_FILE
,
errorReadRequestFile
},
216
{
NOT_EXISTS_DATA_FILE
,
dataFileNotExists
},
217
{
NOT_EXISTS_REQUEST_FILE
,
requestFileNotExists
},
218
{
ERROR_EXECUTE_NOTIFICATION
,
errorExecuteNotification
},
219
{
BAD_FILE_CONTENT
,
badFileContent
},
220
{
SHELL_SCRIPT_NOT_EXIST
,
shellScriptNotExist
},
221
{
SHELL_SCRIPT_CANNOT_EXECUTE
,
shellScriptCannotExecute
},
222
{
WRONG_TYPE_TASK_REQUEST
,
wrongTypeTaskRequest
},
223
{
WRONG_TYPE_THREAD_MODE
,
wrongTypeThreadMode
},
224
{
EXECUTE_SHELL_HOST_COMMAND_FAIL
,
executeShellHostCommandFail
},
225
{
SHELL_HOST_COMMAND_RETURN_ERROR
,
shellHostCommandReturnError
},
226
{
WRONG_TYPE_REMOTE_EXCUTION
,
wrongTypeRemoteExecution
},
227
{
TASK_CONTINUES_TO_RUN
,
taskContinuesToRun
},
228
{
WRONG_CHECK_TYPE
,
wrongCheckType
},
229
{
WRONG_FETCH_TYPE
,
wrongFetchType
},
230
{
WRONG_ALGORITHM_TYPE
,
wrongAlgorithmType
},
231
{
BAD_COMMAND_PARAMS
,
badCommandParams
},
232
{
BAD_TASK_ID
,
badTaskId
},
233
{
DATA_NOT_RANGE
,
dataNotRange
},
234
{
SEARCH_TASK
,
searchTask
},
235
{
CANCEL_TASK
,
cancelTask
},
236
{
INVALID_PID_PROCESS
,
invalidPidProcess
},
237
{
TASK_NOT_FOUND
,
taskNotFound
},
238
{
TASK_DATA_NOT_FOUND
,
taskDataNotFound
},
239
{
PROCESS_WAS_NOT_STOPPED
,
processWasNotStopped
},
240
{
CHANGE_STATE
,
changeState
},
241
{
TASK_TIME_EXPIRED
,
taskTimeExpired
},
242
{
TASK_CANCELED
,
taskCanceled
},
243
{
EXCEEDED_CPU_LOAD
,
exceededCpuLoad
},
244
{
EXCEEDED_IOWAIT_LOAD
,
exceededIOWaitLoad
},
245
{
PRESENT_LOADING
,
presentLoading
},
246
{
EXCEEDED_DISK_SPACE
,
exceededDiskSpace
},
247
{
USAGE
,
usage
},
248
{
FREE
,
free
},
249
{
BYTES
,
bytes
},
250
{
PERCENTS
,
percents
},
251
{
EXCEEDED_RESOURCE_RAM
,
exceededResourceRAM
},
252
{
EXCEEDED_VIRTUAL_RAM
,
exceededVirtualRAM
},
253
{
EXCEEDED_PROCESSES_COUNT
,
exceededProcessesCount
},
254
{
EXCEEDED_THREADS_COUNT
,
exceededThreadsCount
},
255
{
EXCEEDED_USAGE_IOWAIT_LOAD
,
exceededUsageIOWaitLoad
},
256
{
EXCEEDED_USAGE_VIRTUAL_RAM
,
exceededUsageVirtualRAM
},
257
{
EXCEEDED_USAGE_RESOURCE_RAM
,
exceededUsageResourceRAM
},
258
{
EXCEEDED_USAGE_DISK_SPACE
,
exceededUsageDiskSpace
},
259
{
CLEANUP_BAD_FLAG
,
cleanupBadFlag
},
260
{
PID
,
pid
},
261
{
SUBTASK_EXECUTION_ERROR
,
subtaskExecutionError
},
262
{
START_CLEANUP_TASK_ERROR
,
startCleanupTaskError
},
263
{
EMPTY_FILE_CONTENT
,
emptyFileContent
},
264
{
GET_CURRENT_TASKS_QUEUE_ERROR
,
getCurrentTasksQueueError
},
265
{
GET_LIST_ALL_TASKS_ERROR
,
getListAllTasksError
},
266
{
GET_RESOURCE_USAGE_ERROR
,
getResourceUsageError
},
267
{
TASK_BUSY
,
taskBusy
},
268
{
TARGET_CLIENTS_NOT_AVAILABLE
,
targetClientsNotAvailable
},
269
{
NODE_NOT_SUPPORTED
,
nodeNotSupported
},
270
{
DATA_FILE_IS_EMPTY
,
dataFileIsEmpty
},
271
{
SET_ENVIRONMENT_ERROR
,
setEnvironmentError
},
272
{
DUMP_RESOURCE_MONITOR_FAIL
,
dumpResourceMonitorFail
},
273
{
RESTORE_RESOURCE_MONITOR_FAIL
,
restoreResourceMonitorFail
}
274
};
275
//-----------------------------------------------------------------------------
276
}
// end namespace message_const
277
//-----------------------------------------------------------------------------
278
//-----------------------------------------------------------------------------
279
namespace
drce_const
280
{
281
// constants use in functional object
282
const
std::string
moduleName
=
"DRCE"
;
// for init LoggerStream
283
const
std::string
dataFileExt
=
"data"
;
284
const
std::string
requestFileExt
=
"req"
;
285
const
std::string
dumpFileName
=
"queue.dump"
;
286
// list names use for resource usage array
287
const
std::string
taskPrefix
=
"TASK_"
;
288
const
std::string
hostPrefix
=
"HOST_"
;
289
290
const
std::string
cpu
=
"CPU"
;
291
const
std::string
iowait
=
"IOWAIT"
;
292
const
std::string
vram
=
"VRAM"
;
293
const
std::string
rram
=
"RRAM"
;
294
const
std::string
disk
=
"DISK"
;
295
const
std::string
processes
=
"PROCESSES"
;
296
const
std::string
threads
=
"THREADS"
;
297
const
std::string
loadavg
=
"LOADAVG"
;
298
299
const
std::string
taskCpu
=
taskPrefix
+
cpu
;
// "TASK_CPU"
300
const
std::string
taskVram
=
taskPrefix
+
vram
;
// "TASK_VRAM"
301
const
std::string
taskRram
=
taskPrefix
+
rram
;
// "TASK_RRAM"
302
const
std::string
taskThreads
=
taskPrefix
+
threads
;
// "TASK_THREADS"
303
const
std::string
hostCpu
=
hostPrefix
+
cpu
;
// "HOST_CPU"
304
const
std::string
hostIowait
=
hostPrefix
+
iowait
;
// "HOST_IOWAIT"
305
const
std::string
hostVram
=
hostPrefix
+
vram
;
// "HOST_VRAM"
306
const
std::string
hostRram
=
hostPrefix
+
rram
;
// "HOST_RRAM"
307
const
std::string
hostDisk
=
hostPrefix
+
disk
;
// "HOST_DISK"
308
const
std::string
hostProcesses
=
hostPrefix
+
processes
;
// "HOST_PROCESSES"
309
const
std::string
hostThreads
=
hostPrefix
+
threads
;
// "HOST_THREADS"
310
const
std::string
hostLoadAverage
=
hostPrefix
+
loadavg
;
// "HOST_LOADAVG"
311
// constants of logger for tasks queue log
312
const
std::string
DRCE_TASKS_LOGGER
=
"DRCEFO-Tasks"
;
313
const
std::string
DRCE_TASKS_LOGGER_DELIMITER
=
" - "
;
314
const
std::string
DRCE_TASKS_LOGGER_CREATED
=
"C"
;
315
const
std::string
DRCE_TASKS_LOGGER_DELETED
=
"D"
;
316
// constants of exit status
317
const
unsigned
int
EXIT_STATUS_BASE
= 128;
318
const
unsigned
int
REPEAT_TRY_READ_DATA_FILE
= 5;
319
}
// end namespace drce_const
320
//-----------------------------------------------------------------------------
321
//-----------------------------------------------------------------------------
322
}
// end namespace drce
323
}
// end namespace HCE
324
325
#endif // DRCE_MESSAGE_CONST_HPP
sources
utils
DRCE
src
DRCEMessageConst.hpp
Generated on Tue Jun 30 2015 19:42:11 for hce-node application by
1.8.1.2