HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.
2.0.0-chaika
Hierarchical Cluster Engine Python language binding
|
Public Member Functions | |
def | __init__ (self, configParser, connectionBuilderLight=None) |
def | onUpdateResourcesDataResponse (self, event) |
def | on_poll_timeout (self) |
def | getResourceFromTaskResponse (self, taskResponseObjects) |
def | sendUpdateResourceDataRequest (self, resourcesList) |
def | getConnectedNodesFromSchema (self, clusterSchemaObj) |
def | sendToHCENodeAdmin (self, host, port, messageParameters) |
def | getObjectFromJsonFile (self, filePath) |
def | loadFromFile (self, filePath) |
Public Member Functions inherited from app.BaseServerManager.BaseServerManager | |
def | __init__ (self, poller_manager=None, admin_connection=None, conectionLightBuilder=None, exceptionForward=False, dumpStatVars=True) |
constructor More... | |
def | addConnection (self, name, connection) |
def | setEventHandler (self, eventType, handler) |
set event handler rewrite the current handler for eventType More... | |
def | send (self, connect_name, event) |
send event More... | |
def | reply (self, event, reply_event) |
wrapper for sending event in reply for event More... | |
def | poll (self) |
poll function polling connections receive as multipart msg, the second argument is pickled pyobj More... | |
def | process (self, event) |
process event call the event handler method that was set by user or on_unhandled_event method if not set More... | |
def | run (self) |
def | is_connection_registered (self, name) |
check is a connection was registered in a instance of BaseServerManager i object More... | |
def | on_poll_timeout (self) |
function will call every time when ConnectionTimeout exception arrive More... | |
def | on_unhandled_event (self, event) |
function will call every time when arrive doesn't set handler for event type of event.evenType More... | |
def | build_poller_list (self) |
def | clear_poller (self) |
def | onAdminState (self, event) |
onAdminState event handler process admin SHUTDOWN command More... | |
def | onAdminFetchStatData (self, event) |
onAdminState event handler process admin command More... | |
def | onAdminSuspend (self, event) |
onAdminState event handler process admin command More... | |
def | getStatDataFields (self, fields) |
getStatDataFields returns stat data from storage More... | |
def | getSystemStat (self) |
getSystemStat returns stat data for system indicators: RAMV, RAMR and CPU More... | |
def | getConfigVarsFields (self, fields) |
getConfigVarsFields returns config vars from storage More... | |
def | onAdminGetConfigVars (self, event) |
onAdminGetConfigVars event handler process getConfigVars admin command, fill and return config vars array from internal storage More... | |
def | onAdminSetConfigVars (self, event) |
onAdminSetConfigVars event handler process setConfigVars admin command More... | |
def | setConfigVars (self, setConfigVars) |
processSetConfigVars sets config vars in storage More... | |
def | sendAdminReadyEvent (self) |
send ready event to notify adminInterfaceService More... | |
def | createLogMsg (self, event) |
from string message from event object More... | |
def | initStatFields (self, connect_name) |
add record in statFields More... | |
def | updateStatField (self, field_name, value, operation=STAT_FIELDS_OPERATION_ADD) |
update values of stat field - default sum More... | |
def | processSpecialConfigVars (self, name, value) |
send ready event to notify adminInterfaceService More... | |
def | getLogLevel (self) |
Get log level from first of existing loggers. More... | |
def | setLogLevel (self, level) |
Set log level for all loggers. More... | |
def | saveStatVarsDump (self) |
Save stat vars in json file. More... | |
def | loadStatVarsDump (self) |
Load stat vars in json file. More... | |
def | getStatVarsDumpFileName (self) |
Get stat vars file name. More... | |
def | createDBIDict (self, configParser) |
Public Attributes | |
clientResourcesManagerName | |
resourcesUpdateDRCERequestJsonFile | |
hceClusterSchemaFile | |
hceNodeAdminTimeout | |
hceNodeManagerRequest | |
drceIdGenerator | |
drceCommandConvertor | |
Public Attributes inherited from app.BaseServerManager.BaseServerManager | |
dumpStatVars | |
poller_manager | |
eventBuilder | |
exit_flag | |
pollTimeout | |
connections | |
event_handlers | |
statFields | |
stat fields container More... | |
configVars | |
exceptionForward | |
Static Public Attributes | |
string | CONFIG_RESOURCES_MANAGER_CLIENT = "clientResourcesManager" |
string | CONFIG_HCE_NODE_ADMIN_TIMEOUT = "HCENodeAdminTimeout" |
string | CONFIG_UPDATE_RESOURCES_DRCE_JSON = "FetchResourcesStateDRCEJsonFile" |
string | CONFIG_HCE_CLUSTER_SCHEMA_FILE = "HCEClusterSchemaFile" |
string | CONFIG_POLLING_TIMEOUT = "PollingTimeout" |
string | ERROR_UPDATE_RESOURCES = "Not all resources updated!" |
string | ERROR_JSON_DECODE = "Json decode error!" |
string | ERROR_RESOURCES_LISTS_NOT_EQUAL = "Lists of sent and received messages not equal!" |
string | ERROR_READ_FILE = "Error read file" |
string | ERROR_READ_DRCE_JSON_FILE = "Error read DRCE update resources state request json file" |
string | ERROR_HCE_RESPONSE_PROCESSING_EXCEPTION = "HCE node Admin API response processing exception" |
string | ERROR_HCE_CLUSTER_SCHEMA_STRUCTURE_WRONG = "Wrong structure of HCE cluster schema object" |
string | ERROR_HCE_NODE_REQUEST_ERROR = "HCE node request error" |
string | ERROR_HCE_RESPONSE_PROCESSING_FORMAT_ADMIN = "HCE node response format error, cant to split" |
string | ERROR_HCE_RESPONSE_PROCESSING_NO_RESOURCE_IN_RESPONSE = "No resource data found in response or response with error" |
string | ERROR_NO_ITEMS_IN_DRCE_RESPONSE = "No items in DRCE response" |
string | ERROR_DRCE_RESPONSE_ERROR_CODE = "DRCE response with error" |
string | ERROR_RE_PARSE_NO_MATCHES = "RE parse results from DRCE node, no matches!" |
Static Public Attributes inherited from app.BaseServerManager.BaseServerManager | |
string | ADMIN_CONNECT_ENDPOINT = "Admin" |
string | ADMIN_CONNECT_CLIENT = "Admin" |
int | POLL_TIMEOUT_DEFAULT = 3000 |
int | STAT_FIELDS_OPERATION_ADD = 0 |
int | STAT_FIELDS_OPERATION_SUB = 1 |
int | STAT_FIELDS_OPERATION_SET = 2 |
int | STAT_FIELDS_OPERATION_INIT = 3 |
string | POLL_TIMEOUT_CONFIG_VAR_NAME = "POLL_TIMEOUT" |
string | LOG_LEVEL_CONFIG_VAR_NAME = "LOG_LEVEL" |
string | STAT_DUMPS_DEFAULT_DIR = "/tmp/" |
string | STAT_DUMPS_DEFAULT_NAME = "%APP_NAME%_%CLASS_NAME%_stat_vars.dump" |
dictionary | LOGGERS_NAMES = {APP_CONSTS.LOGGER_NAME, "dc", "dtm", "root", ""} |
Definition at line 54 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.__init__ | ( | self, | |
configParser, | |||
connectionBuilderLight = None |
|||
) |
Definition at line 84 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.getConnectedNodesFromSchema | ( | self, | |
clusterSchemaObj | |||
) |
Definition at line 336 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.getObjectFromJsonFile | ( | self, | |
filePath | |||
) |
Definition at line 391 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.getResourceFromTaskResponse | ( | self, | |
taskResponseObjects | |||
) |
Definition at line 199 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.loadFromFile | ( | self, | |
filePath | |||
) |
Definition at line 415 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.on_poll_timeout | ( | self | ) |
Definition at line 148 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.onUpdateResourcesDataResponse | ( | self, | |
event | |||
) |
Definition at line 126 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.sendToHCENodeAdmin | ( | self, | |
host, | |||
port, | |||
messageParameters | |||
) |
Definition at line 359 of file ResourcesStateMonitor.py.
def dtm.ResourcesStateMonitor.ResourcesStateMonitor.sendUpdateResourceDataRequest | ( | self, | |
resourcesList | |||
) |
Definition at line 323 of file ResourcesStateMonitor.py.
dtm.ResourcesStateMonitor.ResourcesStateMonitor.clientResourcesManagerName |
Definition at line 94 of file ResourcesStateMonitor.py.
|
static |
Definition at line 60 of file ResourcesStateMonitor.py.
|
static |
Definition at line 58 of file ResourcesStateMonitor.py.
|
static |
Definition at line 61 of file ResourcesStateMonitor.py.
|
static |
Definition at line 57 of file ResourcesStateMonitor.py.
|
static |
Definition at line 59 of file ResourcesStateMonitor.py.
dtm.ResourcesStateMonitor.ResourcesStateMonitor.drceCommandConvertor |
Definition at line 119 of file ResourcesStateMonitor.py.
dtm.ResourcesStateMonitor.ResourcesStateMonitor.drceIdGenerator |
Definition at line 117 of file ResourcesStateMonitor.py.
|
static |
Definition at line 74 of file ResourcesStateMonitor.py.
|
static |
Definition at line 69 of file ResourcesStateMonitor.py.
|
static |
Definition at line 70 of file ResourcesStateMonitor.py.
|
static |
Definition at line 68 of file ResourcesStateMonitor.py.
|
static |
Definition at line 71 of file ResourcesStateMonitor.py.
|
static |
Definition at line 72 of file ResourcesStateMonitor.py.
|
static |
Definition at line 64 of file ResourcesStateMonitor.py.
|
static |
Definition at line 73 of file ResourcesStateMonitor.py.
|
static |
Definition at line 75 of file ResourcesStateMonitor.py.
|
static |
Definition at line 67 of file ResourcesStateMonitor.py.
|
static |
Definition at line 66 of file ResourcesStateMonitor.py.
|
static |
Definition at line 65 of file ResourcesStateMonitor.py.
|
static |
Definition at line 63 of file ResourcesStateMonitor.py.
dtm.ResourcesStateMonitor.ResourcesStateMonitor.hceClusterSchemaFile |
Definition at line 96 of file ResourcesStateMonitor.py.
dtm.ResourcesStateMonitor.ResourcesStateMonitor.hceNodeAdminTimeout |
Definition at line 113 of file ResourcesStateMonitor.py.
dtm.ResourcesStateMonitor.ResourcesStateMonitor.hceNodeManagerRequest |
Definition at line 114 of file ResourcesStateMonitor.py.
dtm.ResourcesStateMonitor.ResourcesStateMonitor.resourcesUpdateDRCERequestJsonFile |
Definition at line 95 of file ResourcesStateMonitor.py.