Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Master Class Reference

#include <Master.h>

Inheritance diagram for Master:

Object List of all members.

Public Methods

 Master (int port=0, const char *console_file=0)
int initialized ()
 ~Master ()
void startMaster ()
void checkingThread ()
void consoleOutThread ()
void consoleInThread ()
void httpServerThread ()
virtual int compare (Object *)
virtual ObjectCopy ()

Private Methods

void dispatchMsg (XMLData *msg, Address *remote)
void msgJobCtrl (XMLData *msg, Address *remote, CharStr *user)
void msgJobCtrl_Stop (JobEntry *job, Address *remote)
void msgJobCtrl_StopAllName (JobEntry *job, Address *remote)
void msgJobCtrl_StopAllUser (JobEntry *job, Address *remote, CharStr *user)
void msgJobCtrl_GetStatus (JobEntry *job, Address *remote)
void msgTaskInit (XMLData *msg, Address *remote, CharStr *user)
void msgTaskInit_Reserve (TaskEntry *task, SlaveEntry *slave)
void msgTaskInit_Normal (TaskEntry *task)
void msgClientStatus (XMLData *msg, Address *remote, CharStr *user)
void msgClientStatus_On (JobId &jid, Address &clientAddress, XMLData *msg, CharStr *user)
void msgClientStatus_Off (Address *remote, JobId &jid, XMLData *msg)
void msgTaskCtrl (XMLData *msg, Address *remote, CharStr *user)
void msgTaskCtrl_Stop (TaskEntry *task)
void msgTaskCtrl_Ctrl (TaskEntry *task, CharStr *arg)
void msgSlaveReserve (XMLData *msg, Address *remote, CharStr *user)
void msgSlaveCtrl (XMLData *msg, Address *remote, CharStr *user)
void msgSlaveCtrl_Upgrade (XMLData *msg, Address *remote)
int sndMessageToClient (Address *remote, JobEntry *job, XMLData *msg, int dont_queue=QUEUE_MSG)
int sndStatusError (Address *remote, char *err, XMLData *jobId)
int sndJobStatus (Address *remote, JobEntry *job, JobId &jobId, job_state stat, char *err, XMLData *reserveInfo=XMLData::Nil, int dont_queue_msg=QUEUE_MSG)
int sndTaskStatus (Address *remote, JobEntry *job, TaskId &taskId, task_state stat, const char *error, int dont_queue_msg=QUEUE_MSG)
int sndSlaveStatus (Address *remote, int ok, const char *error=0)
int sndTaskFinish ()
int sndSlaveAvail (Address *remote, JobEntry *job, int slavesRequired, XMLData *slaveInfos, ReserveId resID)
void msgTaskStatus (XMLData *msg, Address *remote)
void msgTaskStatus_Refused (TaskEntry *task, XMLData *msg, int &forwarded)
void msgTaskStatus_Started (TaskEntry *task, XMLData *msg, int &forwarded)
void msgTaskStatus_Ok (TaskEntry *task, XMLData *msg, int &forwarded)
void msgTaskStatus_Crashed (TaskEntry *task, XMLData *msg, int &forwarded)
void msgTaskFinish (XMLData *msg, Address *remote)
void msgTaskMove (XMLData *msg, Address *remote)
void msgSlaveStatus (XMLData *msg, Address *remote)
void msgSlaveStatus_Off (SlaveEntry *slave)
int msgSlaveStatus_Ready (SlaveEntry *&slave, Address *remote, XMLData *info, slave_state stat)
void msgSlaveStatus_Busy (SlaveEntry *slave)
void msgSlaveStatus_Disabled (SlaveEntry *slave)
int sndMessageToSlave (Address *remote, XMLData *msg)
int sndTaskCtrl (Address *remote, TaskId &taskId, CharStr *action, CharStr *arg=CharStr::Error)
int sndTaskInit (Address *remote, TaskId &taskId, CharStr *taskURL, long taskTimeout, CharStr *data, CharStr *userData)
int sndSlaveCtrl (Address *remote, CharStr *action, CharStr *URL=CharStr::Error)
void slaveSetState (SlaveEntry *slave, slave_state state)
JobEntrysrchJob (JobId &jobId)
JobEntrysrchJob (XMLData *msg)
TaskEntrysrchTask (TaskId taskId)
ReserveEntrysrchReserve (ReserveId &resID)
TaskInfoslaveMatchTasks (SlaveInfo *slaveInfo, List *taskInfos)
int slaveMatchSlaves (SlaveInfo *slaveInfo, List *slaveInfos)
int slaveMatchSlave (SlaveInfo *info1, SlaveInfo *info2)
SlaveEntrysrchSlaveAddr (Address &addr)
SlaveEntrysrchSlaveTaskInfos (slave_state state, List *taskInfos, CharStr *&matchedURL, long &taskTimeout, CharStr *&userData)
SlaveEntrysrchSlaveSlaveInfos (slave_state state, List *slaveInfos)
CharStrmatchURL (SlaveInfo *sInfo, XMLData *msg)
int verifyUserPswd (CharStr *user, CharStr *pswd, Address *client_addr)
int checkUser (CharStr *user1, CharStr *user2)
int checkUser (CharStr *user1, char *user2)
void checkBufferedTasks ()
void checkReserves ()
void startTask (TaskEntry *task, SlaveEntry *slave, CharStr *taskURL, long taskTimeout, CharStr *userData)
void deleteTask (TaskEntry *task)
void moveTask (TaskEntry *task, List &lSrc, List &lDst)
void upgradeSlave (SlaveEntry *s, int immediate, CharStr *newVersion, CharStr *url)
void log_task_msg (TaskEntry *task, XMLData *msg, msg_direction dir)
void log_job_msg (JobEntry *slave, XMLData *msg, msg_direction dir)
void log_slave_msg (SlaveEntry *slave, XMLData *msg, msg_direction dir)
void log_other_msg (XMLData *msg, msg_direction dir)
void log_slave_state_change (SlaveEntry *slave, slave_state state1, slave_state state2)
void log_slave_total (ZTime &now, int sReady, int sDisabled, int sBusy, int sReserved)
void make_dir (char *dir_name)
void print_status (FILE *f, int html)
void write_status ()

Private Attributes

List lSlaves
List lJobs
List lTasksRun
List lTasksWait
List lReservs
List lClientMsg
List lJobIDTable
PostOfficepo
Lock lock
Semaphore monitor
int master_running
int threads_running
int shutdown
qpzuserdbuserdb
ZTime next_userfile_reload
long task_launch_timeout
int max_send_retry
long slave_status_timeout
long client_resend_timeout
long slave_reserve_timeout
char log_root [250]
long log_on
char * userfile
long userfile_reload_period
char * master_privatekeyfile
char * status_file
int meta_refresh_period
int permanent_upgrade
XMLDatapu_config
List toUpgradeLater
XMLDataupgradeLaterURLs
CharStrupgradeLaterVersion
FILE * console
char * prompt
int inputPrompt
char * master_addr
char * status_msg
char * last_status_msg
int update_status
int no_input
int init_ok
ZTime running_since
double running_since_as_double
int totalTasks
int totalJobs
int totalReservations

Constructor & Destructor Documentation

Master::Master int    port = 0,
const char *    console_file = 0
 

Definition at line 149 of file Master.cpp.

References client_resend_timeout, console, DBUG_PRINT, DBUG_SETFILE, DEFAULT_LOG_ROOT, DEFAULT_MASTER_CONFIG_FILE, DEFAULT_MASTER_HTTP_ROOT, DEFAULT_MASTER_PRIV_KEYFILE, DEFAULT_MAX_SEND_RETRY, DEFAULT_PERMANENT_UPGRADE, DEFAULT_PROMPT, DEFAULT_RANDOM_FILE, DEFAULT_STATUS_FILE, DEFAULT_USER_FILE, CharStr::Error, ZTime::GetTimeOfDay(), init_ok, PostOffice::init_sockets(), PostOffice::initialized(), inputPrompt, K_CLIENT_RESEND_TIMEOUT, K_DBUG_LOG_ON, K_LOG_ON, K_LOG_ROOT, K_MASTER_HTTP_ROOT, K_MASTER_PORT, K_MASTER_PRIVATEKEY_FILE, K_META_REFRESH_PERIOD, K_PERMANENT_UPGRADE, K_RANDOM_FILE, K_SLAVE_RESERVE_TIMEOUT, K_SLAVE_STATUS_TIMEOUT, K_STATUS_FILE, K_TASK_LAUNCH_TIMEOUT, K_USERFILE, K_USERFILE_RELOAD_T, log_on, log_root, make_dir(), master_addr, master_console_in_entry(), master_console_out_entry(), master_http_server(), master_privatekeyfile, master_running, max_send_retry, meta_refresh_period, monitor, N_MASTER_CFG_KWS, next_userfile_reload, XMLData::Nil, no_input, ZTime::Now(), permanent_upgrade, po, Semaphore::post(), RSAcrypter::privatekey, prompt, pu_config, PU_FILENAME, read_config(), XMLData::ReadError, running_since, running_since_as_double, qpzuserdb::save_on_delete, ZTime::sec, shutdown, slave_reserve_timeout, slave_status_timeout, startThread(), status_file, status_msg, XMLData::tag(), task_launch_timeout, THRD_HANDLE, threads_running, totalJobs, totalReservations, totalTasks, UDP_PORT_STRICT, upgradeLaterURLs, upgradeLaterVersion, ZTime::usec, userdb, userfile, userfile_reload_period, and XMLData.

Master::~Master  
 

Definition at line 348 of file Master.cpp.

References console, DBUG_PRINT, free_messages(), master_addr, master_running, monitor, XMLData::Nil, po, Semaphore::post(), pu_config, List::Release(), PostOffice::release_sockets(), CharStr::released(), SLEEP_MSEC, status_file, toUpgradeLater, upgradeLaterURLs, upgradeLaterVersion, and userdb.


Member Function Documentation

void Master::checkBufferedTasks   [private]
 

Definition at line 1746 of file Master.cpp.

References checkReserves(), CharStr::Error, List::Get_Next(), lTasksWait, List::Remove(), slave_ready, srchSlaveTaskInfos(), List::Start_Get(), startTask(), and TaskEntry::taskInfos.

Referenced by checkingThread(), msgJobCtrl_Stop(), msgSlaveStatus_Ready(), msgTaskMove(), and msgTaskStatus_Refused().

void Master::checkingThread  
 

Definition at line 877 of file Master.cpp.

References SlaveInfo::addr, checkBufferedTasks(), PostOffice::checkN(), JobEntry::cl_addr, client_resend_timeout, List::Count(), ClientMsgEntry::count_sent, SlaveInfo::cpu_speed, DBUG_PRINT, PostOffice::deleteN(), deleteTask(), List::Get_Next(), Address::getIP(), Address::getPort(), TaskId::id, TaskEntry::id, JobId::id, JobEntry::id, SlaveEntry::info, ClientMsgEntry::job, TaskEntry::job, ClientMsgEntry::last_sent, SlaveStatistics::last_state_change, lClientMsg, Lock::lock(), lock, lSlaves, lTasksRun, ClientMsgEntry::mId, monitor, ClientMsgEntry::msg, msgTaskInit_Normal(), JobId::name(), next_userfile_reload, ZTime::Now(), po, Semaphore::post(), ZTime::print(), SlaveStatistics::rank, List::Remove(), running_since_as_double, qpzuserdb::save_on_delete, ZTime::sec, SlaveStatistics::sec_busy, SlaveStatistics::sec_disabled, send_confirm, send_invalid, PostOffice::sendN(), TaskEntry::slave, slave_disabled, slave_off, slave_ready, slave_reserve_timeout, slave_reserved, slave_status_timeout, slaveSetState(), SLEEP_MSEC, sm_sign, sndTaskCtrl(), sndTaskStatus(), List::Start_Get(), SlaveEntry::stat(), TaskEntry::stat, SlaveEntry::statistics, SlaveEntry::task, task_crashed, task_launch, task_launch_moved, task_started, threads_running, SlaveEntry::time_last_status, SlaveEntry::time_reserved, TaskEntry::timeend, Lock::unlock(), ZTime::usec, userdb, userfile, userfile_reload_period, and write_status().

void Master::checkReserves   [private]
 

Definition at line 1769 of file Master.cpp.

References XMLData::add(), List::Add(), JobEntry::cl_addr, List::Count(), DBUG_PRINT, List::Get_Next(), ReserveId::id, ReserveEntry::id, SlaveEntry::info, ReserveEntry::job, SlaveEntry::jobReserved, lReservs, lSlaves, ReserveId::name(), XMLData::Nil, ZTime::Now(), o2x(), ReserveEntry::parallel, List::Release(), List::Remove(), ReserveEntry::slave_infos, slave_ready, slave_reserved, slaveMatchSlaves(), slaveSetState(), ReserveEntry::slavesRequired, sndSlaveAvail(), srchSlaveSlaveInfos(), List::Start_Get(), SlaveEntry::stat(), SlaveEntry::time_reserved, and XMLData.

Referenced by checkBufferedTasks(), and msgSlaveReserve().

int Master::checkUser CharStr   user1,
char *    user2
[private]
 

Definition at line 3827 of file Master.cpp.

References CharStr::str.

int Master::checkUser CharStr   user1,
CharStr   user2
[private]
 

Definition at line 3821 of file Master.cpp.

References CharStr::str.

Referenced by msgClientStatus_On(), msgJobCtrl(), msgSlaveCtrl(), msgSlaveReserve(), msgTaskCtrl(), and msgTaskInit().

virtual int Object::compare Object   [inline, virtual, inherited]
 

To ensure a consistent comparison interface and to allow comparison of all kinds of different objects, we will define a comparison functions.

Definition at line 31 of file Object.h.

void Master::consoleInThread  
 

Definition at line 445 of file Master.cpp.

References SlaveInfo::addr, JobEntry::cl_addr, JobEntry::cl_stat, client_on, DBUG_PRINT, DEFAULT_PROMPT, disable_slave, enable_slave, CharStr::Error, Address::getAddress(), SlaveEntry::info, inputPrompt, K_MASTER_PORT, Lock::lock(), lock, main_menu(), master_running, monitor, msgJobCtrl_Stop(), msgTaskCtrl_Stop(), po, Semaphore::post(), prompt, shutdown, slave_disabled, slave_reserved, slaveSetState(), sndSlaveCtrl(), srchJob(), srchSlaveAddr(), srchTask(), SlaveEntry::stat(), status_msg, PostOffice::stopWait(), SlaveEntry::task, threads_running, and Lock::unlock().

void Master::consoleOutThread  
 

Definition at line 824 of file Master.cpp.

References cls(), console, DBUG_PRINT, inputPrompt, Lock::lock(), lock, monitor, print_status(), threads_running, Lock::unlock(), Semaphore::value(), and Semaphore::wait().

virtual Object* Object::Copy   [inline, virtual, inherited]
 

To allow a deep copy of data structures we will define a standard interface... This member will return a copy of itself, freshly allocated and deep copied.

Reimplemented in List.

Definition at line 37 of file Object.h.

Referenced by List::Copy(), and List::operator=().

void Master::deleteTask TaskEntry   task [private]
 

Definition at line 3610 of file Master.cpp.

References DBUG_PRINT, TaskEntry::job, lTasksRun, lTasksWait, List::Remove(), TaskEntry::slave, SlaveEntry::task, and JobEntry::tasks.

Referenced by checkingThread(), msgSlaveStatus_Disabled(), msgSlaveStatus_Off(), msgTaskFinish(), msgTaskStatus_Crashed(), and msgTaskStatus_Refused().

void Master::dispatchMsg XMLData   msg,
Address   remote
[private]
 

Definition at line 1139 of file Master.cpp.

References DBUG_PRINT, CharStr::Error, XMLData::getAttrib(), Address::getIP(), XMLData::getString(), Lock::lock(), lock, msgClientStatus(), msgJobCtrl(), msgSlaveCtrl(), msgSlaveReserve(), msgSlaveStatus(), msgTaskCtrl(), msgTaskFinish(), msgTaskInit(), msgTaskMove(), msgTaskStatus(), msgType(), XMLData::Nil, ZTime::Now(), ZTime::print(), CharStr::released(), XMLData::remove(), XMLData::reset(), sndStatusError(), CharStr::stored(), CharStr::str, XMLData::sub(), XMLData::tag(), Lock::unlock(), and verifyUserPswd().

Referenced by startMaster().

void Master::httpServerThread  
 

Definition at line 871 of file Master.cpp.

int Master::initialized   [inline]
 

Definition at line 414 of file Master.h.

References init_ok.

Referenced by main().

void Master::log_job_msg JobEntry   slave,
XMLData   msg,
msg_direction    dir
[private]
 

Definition at line 3677 of file Master.cpp.

References ZTime::GetTimeOfDay(), JobId::id, JobEntry::id, log_on, log_other_msg(), log_root, mdir_c2m, msg_direction, JobId::name(), ZTime::print_ctime(), and XMLData.

Referenced by msgClientStatus_Off(), msgClientStatus_On(), msgJobCtrl(), msgSlaveReserve(), sndJobStatus(), sndSlaveAvail(), sndStatusError(), and sndTaskStatus().

void Master::log_other_msg XMLData   msg,
msg_direction    dir
[private]
 

Definition at line 3701 of file Master.cpp.

References ZTime::GetTimeOfDay(), log_on, log_root, mdir_c2m, mdir_m2c, mdir_m2s, mdir_s2m, msg_direction, ZTime::print_ctime(), and XMLData.

Referenced by log_job_msg(), msgSlaveCtrl(), and sndSlaveStatus().

void Master::log_slave_msg SlaveEntry   slave,
XMLData   msg,
msg_direction    dir
[private]
 

Definition at line 3724 of file Master.cpp.

References SlaveInfo::addr, Address::getIP(), ZTime::GetTimeOfDay(), SlaveEntry::info, log_on, log_root, mdir_s2m, msg_direction, ZTime::print_ctime(), and XMLData.

Referenced by msgSlaveStatus(), msgTaskFinish(), msgTaskMove(), msgTaskStatus(), and sndMessageToSlave().

void Master::log_slave_state_change SlaveEntry   slave,
slave_state    state1,
slave_state    state2
[private]
 

Definition at line 3746 of file Master.cpp.

References SlaveInfo::addr, Address::getIP(), SlaveEntry::info, log_on, log_root, ZTime::Now(), ZTime::print_hour(), running_since, ZTime::sec, slave_busy, slave_contacted, slave_disabled, slave_off, slave_ready, slave_reserved, slave_state, and ZTime::usec.

Referenced by slaveSetState().

void Master::log_slave_total ZTime   now,
int    sReady,
int    sDisabled,
int    sBusy,
int    sReserved
[private]
 

Definition at line 3785 of file Master.cpp.

References log_on, log_root, ZTime::print_hour(), running_since, ZTime::sec, and ZTime::usec.

Referenced by print_status().

void Master::log_task_msg TaskEntry   task,
XMLData   msg,
msg_direction    dir
[private]
 

Definition at line 3658 of file Master.cpp.

References ZTime::GetTimeOfDay(), TaskId::id, JobId::id, TaskEntry::id, TaskId::jId, log_on, log_root, mdir_c2m, msg_direction, JobId::name(), ZTime::print_ctime(), and XMLData.

Referenced by msgTaskCtrl(), msgTaskFinish(), msgTaskInit(), msgTaskStatus_Crashed(), msgTaskStatus_Ok(), msgTaskStatus_Refused(), msgTaskStatus_Started(), and sndTaskStatus().

void Master::make_dir char *    dir_name [private]
 

Definition at line 3641 of file Master.cpp.

References DBUG_PRINT.

Referenced by Master(), and msgClientStatus_On().

CharStr * Master::matchURL SlaveInfo   sInfo,
XMLData   msg
[private]
 

Definition at line 3365 of file Master.cpp.

References SlaveInfo::cpu(), DBUG_PRINT, CharStr::Error, XMLData::getAttrib(), XMLData::getString(), XMLData::Nil, SlaveInfo::os(), XMLData::reset(), CharStr::str, and XMLData::sub().

Referenced by msgSlaveCtrl_Upgrade(), and msgSlaveStatus_Ready().

void Master::moveTask TaskEntry   task,
List   lSrc,
List   lDst
[private]
 

Definition at line 3633 of file Master.cpp.

References List::Add(), DBUG_PRINT, and List::Remove().

Referenced by msgTaskMove().

void Master::msgClientStatus XMLData   msg,
Address   remote,
CharStr   user
[private]
 

Definition at line 2156 of file Master.cpp.

References client_off, client_on, client_state, DBUG_PRINT, DONT_QUEUE_MSG, XMLData::getString(), job_refused, msgClientStatus_Off(), msgClientStatus_On(), XMLData::Nil, sndJobStatus(), status_msg, CharStr::str, XMLData::sub(), and x2o().

Referenced by dispatchMsg().

void Master::msgClientStatus_Off Address   remote,
JobId   jid,
XMLData   msg
[private]
 

Definition at line 2321 of file Master.cpp.

References JobEntry::cl_addr, JobEntry::cl_stat, client_off, DBUG_PRINT, JobEntry::id, job_abandoned, job_refused, log_job_msg(), mdir_c2m, po, PostOffice::purgeIn(), sndJobStatus(), srchJob(), and status_msg.

Referenced by msgClientStatus().

void Master::msgClientStatus_On JobId   jid,
Address   clientAddress,
XMLData   msg,
CharStr   user
[private]
 

Definition at line 2190 of file Master.cpp.

References JobId::_cs_name(), JobIDTableEntry::_cs_name(), JobEntry::_cs_user(), List::Add(), checkUser(), JobEntry::cl_addr, JobEntry::cl_stat, client_off, client_on, DBUG_PRINT, List::Get_Next(), JobEntry::id, JobIDTableEntry::id, JobId::id, ClientMsgEntry::job, job_refused, job_running, job_stopped, lClientMsg, lJobIDTable, lJobs, log_job_msg(), log_root, make_dir(), mdir_c2m, JobId::name(), JobIDTableEntry::name(), List::Remove(), Address::setPort(), sndJobStatus(), srchJob(), List::Start_Get(), status_msg, and totalJobs.

Referenced by msgClientStatus().

void Master::msgJobCtrl XMLData   msg,
Address   remote,
CharStr   user
[private]
 

Definition at line 1260 of file Master.cpp.

References JobEntry::_cs_user(), checkUser(), JobEntry::cl_addr, JobEntry::cl_stat, client_on, DBUG_PRINT, DONT_QUEUE_MSG, get_job_status, Address::getIP(), XMLData::getString(), JobEntry::id, JobId::id, job_ctrl_action, job_refused, log_job_msg(), mdir_c2m, msgJobCtrl_GetStatus(), msgJobCtrl_Stop(), msgJobCtrl_StopAllName(), msgJobCtrl_StopAllUser(), JobId::name(), XMLData::Nil, XMLData::reset(), sndJobStatus(), srchJob(), status_msg, stop_all_jobs_name, stop_all_jobs_user, stop_job, CharStr::str, XMLData::sub(), and x2o().

Referenced by dispatchMsg().

void Master::msgJobCtrl_GetStatus JobEntry   job,
Address   remote
[private]
 

Definition at line 1456 of file Master.cpp.

References XMLData::add(), JobEntry::cl_stat, client_on, List::Get_Next(), JobEntry::id, ReserveEntry::id, ReserveEntry::job, job_abandoned, job_running, lReservs, XMLData::Nil, o2x(), ReserveEntry::parallel, ReserveEntry::slavesRequired, sndJobStatus(), List::Start_Get(), status_msg, and XMLData.

Referenced by msgJobCtrl().

void Master::msgJobCtrl_Stop JobEntry   job,
Address   remote
[private]
 

Definition at line 1346 of file Master.cpp.

References SlaveInfo::addr, checkBufferedTasks(), DONT_QUEUE_MSG, List::Get_Next(), JobEntry::id, TaskEntry::id, SlaveEntry::info, ClientMsgEntry::job, ReserveEntry::job, job_stopped, SlaveEntry::jobReserved, lClientMsg, lJobs, lReservs, lSlaves, lTasksRun, lTasksWait, XMLData::Nil, po, PostOffice::purgeIn(), List::Remove(), TaskEntry::slave, slave_disabled, slave_ready, slave_reserved, slaveSetState(), sndJobStatus(), sndTaskCtrl(), List::Start_Get(), TaskEntry::stat, SlaveEntry::stat(), status_msg, SlaveEntry::task, task_buffered, task_buffered_moved, task_launch, task_launch_moved, task_started, and JobEntry::tasks.

Referenced by consoleInThread(), msgJobCtrl(), msgJobCtrl_StopAllName(), and msgJobCtrl_StopAllUser().

void Master::msgJobCtrl_StopAllName JobEntry   job,
Address   remote
[private]
 

Definition at line 1440 of file Master.cpp.

References JobId::_cs_name(), List::Get_Next(), JobEntry::id, lJobs, msgJobCtrl_Stop(), JobId::name(), CharStr::released(), List::Start_Get(), CharStr::stored(), and CharStr::str.

Referenced by msgJobCtrl().

void Master::msgJobCtrl_StopAllUser JobEntry   job,
Address   remote,
CharStr   user
[private]
 

Definition at line 1428 of file Master.cpp.

References List::Get_Next(), lJobs, msgJobCtrl_Stop(), List::Start_Get(), CharStr::str, and JobEntry::user().

Referenced by msgJobCtrl().

void Master::msgSlaveCtrl XMLData   msg,
Address   remote,
CharStr   user
[private]
 

Definition at line 2002 of file Master.cpp.

References checkUser(), DBUG_PRINT, XMLData::getString(), log_other_msg(), mdir_c2m, msgSlaveCtrl_Upgrade(), slave_ctrl_action, sndSlaveStatus(), status_msg, upgrade_slave, and x2o().

Referenced by dispatchMsg().

void Master::msgSlaveCtrl_Upgrade XMLData   msg,
Address   remote
[private]
 

Definition at line 2037 of file Master.cpp.

References XMLData::add(), DBUG_PRINT, DEFAULT_MASTER_CONFIG_FILE, CharStr::Error, FILE_UNLINK, List::Get_Next(), XMLData::getString(), SlaveEntry::info, K_PERMANENT_UPGRADE, lSlaves, matchURL(), XMLData::Nil, permanent_upgrade, pu_config, PU_FILENAME, List::Release(), CharStr::released(), sndSlaveStatus(), List::Start_Get(), status_msg, CharStr::stored(), CharStr::str, XMLData::sub(), XMLData::subAll(), toUpgradeLater, upgradeLaterURLs, upgradeLaterVersion, upgradeSlave(), write_keyword(), and XMLData.

Referenced by msgSlaveCtrl().

void Master::msgSlaveReserve XMLData   msg,
Address   remote,
CharStr   user
[private]
 

Definition at line 2358 of file Master.cpp.

References JobEntry::_cs_user(), List::Add(), checkReserves(), checkUser(), JobEntry::cl_addr, DBUG_PRINT, XMLData::getLong(), ReserveEntry::id, ReserveId::id, JobEntry::id, ReserveEntry::job, job_refused, job_running, log_job_msg(), lReservs, mdir_c2m, XMLData::Nil, ReserveEntry::parallel, XMLData::reset(), ReserveEntry::slave_infos, ReserveEntry::slavesRequired, sndJobStatus(), srchJob(), srchReserve(), status_msg, XMLData::sub(), totalReservations, and x2o().

Referenced by dispatchMsg().

void Master::msgSlaveStatus XMLData   msg,
Address   remote
[private]
 

Definition at line 2819 of file Master.cpp.

References DBUG_PRINT, Address::getIP(), XMLData::getString(), log_slave_msg(), mdir_s2m, msgSlaveStatus_Busy(), msgSlaveStatus_Disabled(), msgSlaveStatus_Off(), msgSlaveStatus_Ready(), SlaveEntry::prev_stat, XMLData::reset(), SlaveEntry::setInfo(), slave_busy, slave_disabled, slave_off, slave_ready, slave_state, slave_upgrade, sndSlaveCtrl(), srchSlaveAddr(), status_msg, CharStr::str, XMLData::sub(), and x2o().

Referenced by dispatchMsg().

void Master::msgSlaveStatus_Busy SlaveEntry   slave [private]
 

Definition at line 3022 of file Master.cpp.

References SlaveInfo::addr, DBUG_PRINT, SlaveEntry::info, ZTime::Now(), slave_busy, slaveSetState(), sndSlaveCtrl(), SlaveEntry::stat(), status_msg, SlaveEntry::task, and SlaveEntry::time_last_status.

Referenced by msgSlaveStatus().

void Master::msgSlaveStatus_Disabled SlaveEntry   slave [private]
 

Definition at line 3043 of file Master.cpp.

References JobEntry::cl_addr, deleteTask(), TaskEntry::id, TaskEntry::job, ZTime::Now(), slave_disabled, slaveSetState(), sndTaskStatus(), SlaveEntry::stat(), TaskEntry::stat, status_msg, SlaveEntry::task, task_buffered_moved, task_launch_moved, task_stopped, and SlaveEntry::time_last_status.

Referenced by msgSlaveStatus().

void Master::msgSlaveStatus_Off SlaveEntry   slave [private]
 

Definition at line 2898 of file Master.cpp.

References JobEntry::cl_addr, deleteTask(), TaskEntry::id, TaskEntry::job, sndTaskStatus(), TaskEntry::stat, status_msg, SlaveEntry::task, task_buffered_moved, task_launch_moved, and task_stopped.

Referenced by msgSlaveStatus().

int Master::msgSlaveStatus_Ready SlaveEntry *&    slave,
Address   remote,
XMLData   info,
slave_state    stat
[private]
 

Definition at line 2923 of file Master.cpp.

References List::Add(), SlaveInfo::addr, checkBufferedTasks(), DBUG_PRINT, Address::getIP(), XMLData::getString(), List::Index(), SlaveEntry::info, SlaveEntry::jobReserved, lSlaves, matchURL(), ZTime::Now(), pu_config, List::Remove(), slave_ready, slave_reserved, slave_state, slaveSetState(), SlaveEntry::stat(), status_msg, CharStr::str, XMLData::sub(), SlaveEntry::task, SlaveEntry::time_last_status, toUpgradeLater, update_status, upgradeLaterURLs, upgradeLaterVersion, upgradeSlave(), SlaveInfo::version(), and x2o().

Referenced by msgSlaveStatus().

void Master::msgTaskCtrl XMLData   msg,
Address   remote,
CharStr   user
[private]
 

Definition at line 1859 of file Master.cpp.

References JobEntry::_cs_user(), checkUser(), JobEntry::cl_addr, control_task, DBUG_PRINT, DONT_QUEUE_MSG, XMLData::getLong(), XMLData::getString(), JobEntry::id, JobId::id, TaskId::id, TaskId::jId, log_task_msg(), mdir_c2m, msgTaskCtrl_Ctrl(), msgTaskCtrl_Stop(), JobId::name(), sndTaskStatus(), srchJob(), srchTask(), status_msg, stop_task, CharStr::str, XMLData::sub(), task_ctrl_action, task_refused, and x2o().

Referenced by dispatchMsg().

void Master::msgTaskCtrl_Ctrl TaskEntry   task,
CharStr   arg
[private]
 

Definition at line 1983 of file Master.cpp.

References SlaveInfo::addr, JobEntry::cl_addr, TaskEntry::id, SlaveEntry::info, TaskEntry::job, TaskEntry::slave, sndTaskCtrl(), sndTaskStatus(), TaskEntry::stat, status_msg, task_refused, and task_started.

Referenced by msgTaskCtrl().

void Master::msgTaskCtrl_Stop TaskEntry   task [private]
 

Definition at line 1947 of file Master.cpp.

References JobEntry::cl_addr, DBUG_PRINT, TaskEntry::id, TaskEntry::job, lTasksRun, lTasksWait, List::Remove(), TaskEntry::slave, slave_disabled, slaveSetState(), sndTaskCtrl(), sndTaskStatus(), TaskEntry::stat, status_msg, SlaveEntry::task, task_buffered, task_buffered_moved, task_launch, task_launch_moved, task_started, task_stopped, and JobEntry::tasks.

Referenced by consoleInThread(), and msgTaskCtrl().

void Master::msgTaskFinish XMLData   msg,
Address   remote
[private]
 

Definition at line 2468 of file Master.cpp.

References SlaveInfo::addr, JobEntry::cl_addr, DBUG_PRINT, deleteTask(), XMLData::getLong(), SlaveEntry::info, TaskEntry::job, log_slave_msg(), log_task_msg(), mdir_m2c, mdir_s2m, TaskEntry::slave, sndMessageToClient(), srchTask(), TaskEntry::stat, status_msg, XMLData::sub(), SlaveEntry::task, task_started, and x2o().

Referenced by dispatchMsg().

void Master::msgTaskInit XMLData   msg,
Address   remote,
CharStr   user
[private]
 

Definition at line 1484 of file Master.cpp.

References JobEntry::_cs_user(), List::Add(), XMLData::CDATA, checkUser(), JobEntry::cl_addr, List::Count(), DBUG_PRINT, DONT_QUEUE_MSG, Address::getIP(), XMLData::getString(), TaskEntry::id, JobEntry::id, TaskId::id, JobId::id, TaskId::jId, TaskEntry::job, log_root, log_task_msg(), mdir_c2m, msgTaskInit_Normal(), msgTaskInit_Reserve(), JobId::name(), XMLData::Nil, List::Remove(), sndTaskStatus(), srchJob(), srchSlaveAddr(), srchTask(), status_msg, CharStr::str, XMLData::sub(), task_internal_error, task_refused, TaskEntry::taskInfos, JobEntry::tasks, JobEntry::user(), and x2o().

Referenced by dispatchMsg().

void Master::msgTaskInit_Normal TaskEntry   task [private]
 

Definition at line 1671 of file Master.cpp.

References List::Add(), JobEntry::cl_addr, DBUG_PRINT, CharStr::Error, TaskEntry::id, TaskEntry::job, lTasksWait, slave_ready, sndTaskStatus(), srchSlaveTaskInfos(), startTask(), TaskEntry::stat, status_msg, task_buffered, TaskEntry::taskInfos, and totalTasks.

Referenced by checkingThread(), and msgTaskInit().

void Master::msgTaskInit_Reserve TaskEntry   task,
SlaveEntry   slave
[private]
 

Definition at line 1631 of file Master.cpp.

References TaskInfo::_cs_url(), TaskInfo::_cs_userData(), JobEntry::cl_addr, DBUG_PRINT, CharStr::Error, TaskEntry::id, SlaveEntry::info, TaskEntry::job, SlaveEntry::jobReserved, List::Remove(), slave_reserved, slaveMatchTasks(), sndTaskStatus(), startTask(), SlaveEntry::stat(), status_msg, task_refused, TaskEntry::taskInfos, JobEntry::tasks, TaskInfo::timeout, and totalTasks.

Referenced by msgTaskInit().

void Master::msgTaskMove XMLData   msg,
Address   remote
[private]
 

Definition at line 2531 of file Master.cpp.

References TaskEntry::_cs_data(), SlaveInfo::addr, XMLData::CDATA, checkBufferedTasks(), DBUG_PRINT, XMLData::getLong(), XMLData::getString(), ZTime::GetTimeOfDay(), SlaveEntry::info, log_slave_msg(), lTasksRun, lTasksWait, mdir_s2m, moveTask(), XMLData::Nil, TaskEntry::slave, slave_disabled, slaveSetState(), srchTask(), TaskEntry::stat, status_msg, XMLData::sub(), SlaveEntry::task, task_buffered_moved, task_started, TaskEntry::timeend, TaskEntry::timeout, and x2o().

Referenced by dispatchMsg().

void Master::msgTaskStatus XMLData   msg,
Address   remote
[private]
 

Definition at line 2599 of file Master.cpp.

References SlaveInfo::addr, DBUG_PRINT, XMLData::getLong(), XMLData::getString(), SlaveEntry::info, log_slave_msg(), mdir_s2m, msgTaskStatus_Crashed(), msgTaskStatus_Ok(), msgTaskStatus_Refused(), msgTaskStatus_Started(), TaskEntry::slave, srchTask(), status_msg, CharStr::str, XMLData::sub(), task_crashed, task_ok, task_refused, task_started, and x2o().

Referenced by dispatchMsg().

void Master::msgTaskStatus_Crashed TaskEntry   task,
XMLData   msg,
int &    forwarded
[private]
 

Definition at line 2780 of file Master.cpp.

References JobEntry::cl_addr, DBUG_PRINT, deleteTask(), TaskEntry::job, log_task_msg(), mdir_m2c, o2x(), TaskEntry::slave, sndMessageToClient(), TaskEntry::stat, status_msg, CharStr::str, SlaveEntry::task, and task_started.

Referenced by msgTaskStatus().

void Master::msgTaskStatus_Ok TaskEntry   task,
XMLData   msg,
int &    forwarded
[private]
 

Definition at line 2756 of file Master.cpp.

References JobEntry::cl_addr, DBUG_PRINT, TaskEntry::job, log_task_msg(), mdir_m2c, o2x(), sndMessageToClient(), TaskEntry::stat, status_msg, CharStr::str, and task_started.

Referenced by msgTaskStatus().

void Master::msgTaskStatus_Refused TaskEntry   task,
XMLData   msg,
int &    forwarded
[private]
 

Definition at line 2664 of file Master.cpp.

References checkBufferedTasks(), JobEntry::cl_addr, DBUG_PRINT, deleteTask(), TaskEntry::job, log_task_msg(), mdir_m2c, o2x(), TaskEntry::slave, slave_ready, slaveSetState(), sndMessageToClient(), TaskEntry::stat, status_msg, CharStr::str, SlaveEntry::task, task_launch, and task_started.

Referenced by msgTaskStatus().

void Master::msgTaskStatus_Started TaskEntry   task,
XMLData   msg,
int &    forwarded
[private]
 

Definition at line 2708 of file Master.cpp.

References JobEntry::cl_addr, DBUG_PRINT, TaskEntry::job, log_task_msg(), mdir_m2c, ZTime::Now(), o2x(), XMLData::set(), TaskEntry::slave, slave_busy, slaveSetState(), sndMessageToClient(), TaskEntry::stat, status_msg, CharStr::str, XMLData::sub(), task_launch, task_launch_moved, task_started, TaskEntry::timeend, and TaskEntry::timeout.

Referenced by msgTaskStatus().

void Master::print_status FILE *    f,
int    html
[private]
 

Definition at line 620 of file Master.cpp.

References SlaveInfo::addr, JobEntry::cl_addr, JobEntry::cl_stat, client_on, List::Count(), SlaveInfo::cpu(), SlaveInfo::cpu_speed, SlaveInfo::disk, List::Get_Next(), Address::getIP(), TaskId::id, TaskEntry::id, JobId::id, JobEntry::id, SlaveEntry::info, TaskId::jId, ReserveEntry::job, SlaveStatistics::last_state_change_real, last_status_msg, lClientMsg, lJobs, log_slave_total(), lReservs, lSlaves, lTasksRun, lTasksWait, master_addr, SlaveInfo::mem, meta_refresh_period, JobId::name(), ZTime::Now(), SlaveStatistics::on_since, SlaveInfo::os(), ReserveEntry::parallel, ZTime::print_ctime(), prompt, running_since, ZTime::sec, SlaveStatistics::sec_busy, SlaveStatistics::sec_disabled, slave_busy, slave_contacted, slave_disabled, slave_off, slave_ready, slave_reserved, ReserveEntry::slavesRequired, List::Start_Get(), TaskEntry::stat, SlaveEntry::stat(), SlaveEntry::statistics, status_msg, SlaveEntry::task, task_buffered, task_buffered_moved, task_launch, task_launch_moved, task_started, JobEntry::tasks, SlaveEntry::time_last_status, totalJobs, totalReservations, totalTasks, update_status, ZTime::usec, and JobEntry::user().

Referenced by consoleOutThread(), and write_status().

int Master::slaveMatchSlave SlaveInfo   info1,
SlaveInfo   info2
[private]
 

Definition at line 3214 of file Master.cpp.

References SlaveInfo::addr, SlaveInfo::cpu(), DBUG_PRINT, SlaveInfo::disk, SlaveInfo::disk_unit, Address::getIP(), SlaveInfo::mem, SlaveInfo::mem_unit, SoftwareInfo::name(), SlaveInfo::nSoftInfos, SlaveInfo::os(), SlaveInfo::softwareInfos, and SoftwareInfo::version().

Referenced by slaveMatchSlaves().

int Master::slaveMatchSlaves SlaveInfo   slaveInfo,
List   slaveInfos
[private]
 

Definition at line 3276 of file Master.cpp.

References List::Get_Next(), slaveMatchSlave(), and List::Start_Get().

Referenced by checkReserves(), and srchSlaveSlaveInfos().

TaskInfo * Master::slaveMatchTasks SlaveInfo   slaveInfo,
List   taskInfos
[private]
 

Definition at line 3142 of file Master.cpp.

References SlaveInfo::addr, SlaveInfo::cpu(), TaskInfo::cpu(), DBUG_PRINT, SlaveInfo::disk, TaskInfo::disk, SlaveInfo::disk_unit, TaskInfo::disk_unit, List::Get_Next(), Address::getIP(), SlaveInfo::mem, TaskInfo::mem, SlaveInfo::mem_unit, TaskInfo::mem_unit, SoftwareInfo::name(), SlaveInfo::nSoftInfos, TaskInfo::nSoftInfos, SlaveInfo::os(), TaskInfo::os(), SlaveInfo::softwareInfos, TaskInfo::softwareInfos, List::Start_Get(), and SoftwareInfo::version().

Referenced by msgTaskInit_Reserve(), and srchSlaveTaskInfos().

void Master::slaveSetState SlaveEntry   slave,
slave_state    state
[private]
 

Definition at line 1846 of file Master.cpp.

References log_slave_state_change(), SlaveEntry::setState(), and slave_state.

Referenced by checkingThread(), checkReserves(), consoleInThread(), msgJobCtrl_Stop(), msgSlaveStatus_Busy(), msgSlaveStatus_Disabled(), msgSlaveStatus_Ready(), msgTaskCtrl_Stop(), msgTaskMove(), msgTaskStatus_Refused(), msgTaskStatus_Started(), and startTask().

int Master::sndJobStatus Address   remote,
JobEntry   job,
JobId   jobId,
job_state    stat,
char *    err,
XMLData   reserveInfo = XMLData::Nil,
int    dont_queue_msg = QUEUE_MSG
[private]
 

Definition at line 3448 of file Master.cpp.

References XMLData::add(), List::Get_Next(), job_state, log_job_msg(), mdir_m2c, XMLData::Nil, o2x(), sndMessageToClient(), List::Start_Get(), TaskEntry::stat, task_started, JobEntry::tasks, and xmlmsg().

Referenced by msgClientStatus(), msgClientStatus_Off(), msgClientStatus_On(), msgJobCtrl(), msgJobCtrl_GetStatus(), msgJobCtrl_Stop(), and msgSlaveReserve().

int Master::sndMessageToClient Address   remote,
JobEntry   job,
XMLData   msg,
int    dont_queue = QUEUE_MSG
[private]
 

Definition at line 3388 of file Master.cpp.

References List::Add(), ClientMsgEntry::count_sent, Address::getPort(), ZTime::GetTimeOfDay(), ClientMsgEntry::job, ClientMsgEntry::last_sent, lClientMsg, max_send_retry, ClientMsgEntry::mId, ClientMsgEntry::msg, po, PostOffice::sendN(), and sm_sign.

Referenced by msgTaskFinish(), msgTaskStatus_Crashed(), msgTaskStatus_Ok(), msgTaskStatus_Refused(), msgTaskStatus_Started(), sndJobStatus(), sndSlaveAvail(), sndSlaveStatus(), sndStatusError(), and sndTaskStatus().

int Master::sndMessageToSlave Address   remote,
XMLData   msg
[private]
 

Definition at line 3532 of file Master.cpp.

References log_slave_msg(), mdir_m2s, po, PostOffice::sendN(), and srchSlaveAddr().

Referenced by sndSlaveCtrl(), sndTaskCtrl(), and sndTaskInit().

int Master::sndSlaveAvail Address   remote,
JobEntry   job,
int    slavesRequired,
XMLData   slaveInfos,
ReserveId    resID
[private]
 

Definition at line 3518 of file Master.cpp.

References XMLData::add(), JobEntry::id, log_job_msg(), mdir_m2c, o2x(), sndMessageToClient(), XMLData, and xmlmsg().

Referenced by checkReserves().

int Master::sndSlaveCtrl Address   remote,
CharStr   action,
CharStr   URL = CharStr::Error
[private]
 

Definition at line 3591 of file Master.cpp.

References XMLData::add(), CharStr::Error, sndMessageToSlave(), XMLData, and xmlmsg().

Referenced by consoleInThread(), msgSlaveStatus(), msgSlaveStatus_Busy(), and upgradeSlave().

int Master::sndSlaveStatus Address   remote,
int    ok,
const char *    error = 0
[private]
 

Definition at line 3502 of file Master.cpp.

References XMLData::add(), CharStr::create(), DONT_QUEUE_MSG, log_other_msg(), mdir_m2c, sndMessageToClient(), XMLData, and xmlmsg().

Referenced by msgSlaveCtrl(), and msgSlaveCtrl_Upgrade().

int Master::sndStatusError Address   remote,
char *    err,
XMLData   jobId
[private]
 

Definition at line 3427 of file Master.cpp.

References XMLData::add(), DONT_QUEUE_MSG, job_refused, log_job_msg(), mdir_m2c, XMLData::Nil, o2x(), sndMessageToClient(), XMLData, and xmlmsg().

Referenced by dispatchMsg().

int Master::sndTaskCtrl Address   remote,
TaskId   taskId,
CharStr   action,
CharStr   arg = CharStr::Error
[private]
 

Definition at line 3553 of file Master.cpp.

References XMLData::add(), CharStr::Error, XMLData::Nil, sndMessageToSlave(), XMLData, and xmlmsg().

Referenced by checkingThread(), msgJobCtrl_Stop(), msgTaskCtrl_Ctrl(), and msgTaskCtrl_Stop().

int Master::sndTaskFinish   [private]
 

int Master::sndTaskInit Address   remote,
TaskId   taskId,
CharStr   taskURL,
long    taskTimeout,
CharStr   data,
CharStr   userData
[private]
 

Definition at line 3571 of file Master.cpp.

References XMLData::add(), XMLData::CDATA, CharStr::Error, o2x(), sndMessageToSlave(), XMLData, and xmlmsg().

Referenced by startTask().

int Master::sndTaskStatus Address   remote,
JobEntry   job,
TaskId   taskId,
task_state    stat,
const char *    error,
int    dont_queue_msg = QUEUE_MSG
[private]
 

Definition at line 3485 of file Master.cpp.

References log_job_msg(), log_task_msg(), mdir_m2c, o2x(), sndMessageToClient(), and srchTask().

Referenced by checkingThread(), msgSlaveStatus_Disabled(), msgSlaveStatus_Off(), msgTaskCtrl(), msgTaskCtrl_Ctrl(), msgTaskCtrl_Stop(), msgTaskInit(), msgTaskInit_Normal(), msgTaskInit_Reserve(), and startTask().

JobEntry * Master::srchJob XMLData   msg [private]
 

Definition at line 3090 of file Master.cpp.

References srchJob(), XMLData::sub(), and x2o().

JobEntry * Master::srchJob JobId   jobId [private]
 

Definition at line 3076 of file Master.cpp.

References List::Get_Next(), JobEntry::id, lJobs, and List::Start_Get().

Referenced by consoleInThread(), msgClientStatus_Off(), msgClientStatus_On(), msgJobCtrl(), msgSlaveReserve(), msgTaskCtrl(), msgTaskInit(), and srchJob().

ReserveEntry * Master::srchReserve ReserveId   resID [private]
 

Definition at line 3128 of file Master.cpp.

References List::Get_Next(), ReserveEntry::id, lReservs, and List::Start_Get().

Referenced by msgSlaveReserve().

SlaveEntry * Master::srchSlaveAddr Address   addr [private]
 

Definition at line 3289 of file Master.cpp.

References SlaveInfo::addr, List::Get_Next(), Address::getIP(), SlaveEntry::info, lSlaves, and List::Start_Get().

Referenced by consoleInThread(), msgSlaveStatus(), msgTaskInit(), and sndMessageToSlave().

SlaveEntry * Master::srchSlaveSlaveInfos slave_state    state,
List   slaveInfos
[private]
 

Definition at line 3344 of file Master.cpp.

References List::Get_Next(), SlaveEntry::info, lSlaves, SlaveStatistics::rank, slave_state, slaveMatchSlaves(), List::Start_Get(), SlaveEntry::stat(), and SlaveEntry::statistics.

Referenced by checkReserves().

SlaveEntry * Master::srchSlaveTaskInfos slave_state    state,
List   taskInfos,
CharStr *&    matchedURL,
long &    taskTimeout,
CharStr *&    userData
[private]
 

Definition at line 3311 of file Master.cpp.

References TaskInfo::_cs_url(), TaskInfo::_cs_userData(), List::Get_Next(), SlaveEntry::info, lSlaves, SlaveStatistics::rank, slave_state, slaveMatchTasks(), List::Start_Get(), SlaveEntry::stat(), SlaveEntry::statistics, and TaskInfo::timeout.

Referenced by checkBufferedTasks(), and msgTaskInit_Normal().

TaskEntry * Master::srchTask TaskId    taskId [private]
 

Definition at line 3105 of file Master.cpp.

References List::Get_Next(), TaskEntry::id, lTasksRun, lTasksWait, and List::Start_Get().

Referenced by consoleInThread(), msgTaskCtrl(), msgTaskFinish(), msgTaskInit(), msgTaskMove(), msgTaskStatus(), and sndTaskStatus().

void Master::startMaster  
 

Definition at line 405 of file Master.cpp.

References DBUG_PRINT, dispatchMsg(), master_entry(), monitor, XMLData::Nil, po, Semaphore::post(), PostOffice::receive_any(), PostOffice::ReceiveInterrupted, shutdown, startThread(), and THRD_HANDLE.

Referenced by main().

void Master::startTask TaskEntry   task,
SlaveEntry   slave,
CharStr   taskURL,
long    taskTimeout,
CharStr   userData
[private]
 

Definition at line 1697 of file Master.cpp.

References TaskEntry::_cs_data(), List::Add(), SlaveInfo::addr, JobEntry::cl_addr, TaskEntry::id, SlaveEntry::info, TaskEntry::job, lTasksRun, ZTime::Now(), TaskEntry::slave, slave_contacted, slaveSetState(), sndTaskInit(), sndTaskStatus(), TaskEntry::stat, status_msg, SlaveEntry::task, task_buffered, task_buffered_moved, task_launch, task_launch_moved, task_launch_timeout, TaskEntry::timeend, and TaskEntry::timeout.

Referenced by checkBufferedTasks(), msgTaskInit_Normal(), and msgTaskInit_Reserve().

void Master::upgradeSlave SlaveEntry   s,
int    immediate,
CharStr   newVersion,
CharStr   url
[private]
 

Definition at line 2120 of file Master.cpp.

References List::Add(), SlaveInfo::addr, DBUG_PRINT, CharStr::Error, Address::getIP(), SlaveEntry::info, slave_busy, slave_contacted, slave_reserved, sndSlaveCtrl(), SlaveEntry::stat(), CharStr::str, toUpgradeLater, and SlaveInfo::version().

Referenced by msgSlaveCtrl_Upgrade(), and msgSlaveStatus_Ready().

int Master::verifyUserPswd CharStr   user,
CharStr   pswd,
Address   client_addr
[private]
 

Definition at line 3804 of file Master.cpp.

References qpzuserdb::comparepass(), CharStr::str, and userdb.

Referenced by dispatchMsg().

void Master::write_status   [private]
 

Definition at line 857 of file Master.cpp.

References DBUG_PRINT, print_status(), and status_file.

Referenced by checkingThread().


Member Data Documentation

long Master::client_resend_timeout [private]
 

Definition at line 366 of file Master.h.

Referenced by checkingThread(), and Master().

FILE* Master::console [private]
 

Definition at line 389 of file Master.h.

Referenced by consoleOutThread(), Master(), and ~Master().

int Master::init_ok [private]
 

Definition at line 399 of file Master.h.

Referenced by initialized(), and Master().

int Master::inputPrompt [private]
 

Definition at line 391 of file Master.h.

Referenced by consoleInThread(), consoleOutThread(), and Master().

char* Master::last_status_msg [private]
 

Definition at line 395 of file Master.h.

Referenced by print_status().

List Master::lClientMsg [private]
 

Definition at line 343 of file Master.h.

Referenced by checkingThread(), msgClientStatus_On(), msgJobCtrl_Stop(), print_status(), and sndMessageToClient().

List Master::lJobIDTable [private]
 

Definition at line 344 of file Master.h.

Referenced by msgClientStatus_On().

List Master::lJobs [private]
 

Definition at line 338 of file Master.h.

Referenced by msgClientStatus_On(), msgJobCtrl_Stop(), msgJobCtrl_StopAllName(), msgJobCtrl_StopAllUser(), print_status(), and srchJob().

Lock Master::lock [private]
 

Definition at line 348 of file Master.h.

Referenced by checkingThread(), consoleInThread(), consoleOutThread(), and dispatchMsg().

long Master::log_on [private]
 

Definition at line 371 of file Master.h.

Referenced by log_job_msg(), log_other_msg(), log_slave_msg(), log_slave_state_change(), log_slave_total(), log_task_msg(), and Master().

char Master::log_root[250] [private]
 

Definition at line 370 of file Master.h.

Referenced by log_job_msg(), log_other_msg(), log_slave_msg(), log_slave_state_change(), log_slave_total(), log_task_msg(), Master(), msgClientStatus_On(), and msgTaskInit().

List Master::lReservs [private]
 

Definition at line 342 of file Master.h.

Referenced by checkReserves(), msgJobCtrl_GetStatus(), msgJobCtrl_Stop(), msgSlaveReserve(), print_status(), and srchReserve().

List Master::lSlaves [private]
 

Definition at line 337 of file Master.h.

Referenced by checkingThread(), checkReserves(), msgJobCtrl_Stop(), msgSlaveCtrl_Upgrade(), msgSlaveStatus_Ready(), print_status(), srchSlaveAddr(), srchSlaveSlaveInfos(), and srchSlaveTaskInfos().

List Master::lTasksRun [private]
 

Definition at line 339 of file Master.h.

Referenced by checkingThread(), deleteTask(), msgJobCtrl_Stop(), msgTaskCtrl_Stop(), msgTaskMove(), print_status(), srchTask(), and startTask().

List Master::lTasksWait [private]
 

Definition at line 340 of file Master.h.

Referenced by checkBufferedTasks(), deleteTask(), msgJobCtrl_Stop(), msgTaskCtrl_Stop(), msgTaskInit_Normal(), msgTaskMove(), print_status(), and srchTask().

char* Master::master_addr [private]
 

Definition at line 393 of file Master.h.

Referenced by Master(), print_status(), and ~Master().

char* Master::master_privatekeyfile [private]
 

Definition at line 374 of file Master.h.

Referenced by Master().

int Master::master_running [private]
 

Definition at line 351 of file Master.h.

Referenced by consoleInThread(), Master(), and ~Master().

int Master::max_send_retry [private]
 

Definition at line 362 of file Master.h.

Referenced by Master(), and sndMessageToClient().

int Master::meta_refresh_period [private]
 

Definition at line 376 of file Master.h.

Referenced by Master(), and print_status().

Semaphore Master::monitor [private]
 

Definition at line 350 of file Master.h.

Referenced by checkingThread(), consoleInThread(), consoleOutThread(), Master(), startMaster(), and ~Master().

ZTime Master::next_userfile_reload [private]
 

Definition at line 358 of file Master.h.

Referenced by checkingThread(), and Master().

int Master::no_input [private]
 

Definition at line 397 of file Master.h.

Referenced by Master().

int Master::permanent_upgrade [private]
 

Definition at line 378 of file Master.h.

Referenced by Master(), and msgSlaveCtrl_Upgrade().

PostOffice* Master::po [private]
 

Definition at line 346 of file Master.h.

Referenced by checkingThread(), consoleInThread(), Master(), msgClientStatus_Off(), msgJobCtrl_Stop(), sndMessageToClient(), sndMessageToSlave(), startMaster(), and ~Master().

char* Master::prompt [private]
 

Definition at line 390 of file Master.h.

Referenced by consoleInThread(), Master(), and print_status().

XMLData* Master::pu_config [private]
 

Definition at line 379 of file Master.h.

Referenced by Master(), msgSlaveCtrl_Upgrade(), msgSlaveStatus_Ready(), and ~Master().

ZTime Master::running_since [private]
 

Definition at line 401 of file Master.h.

Referenced by log_slave_state_change(), log_slave_total(), Master(), and print_status().

double Master::running_since_as_double [private]
 

Definition at line 402 of file Master.h.

Referenced by checkingThread(), and Master().

int Master::shutdown [private]
 

Definition at line 355 of file Master.h.

Referenced by consoleInThread(), Master(), and startMaster().

long Master::slave_reserve_timeout [private]
 

Definition at line 368 of file Master.h.

Referenced by checkingThread(), and Master().

long Master::slave_status_timeout [private]
 

Definition at line 364 of file Master.h.

Referenced by checkingThread(), and Master().

char* Master::status_file [private]
 

Definition at line 375 of file Master.h.

Referenced by Master(), write_status(), and ~Master().

char* Master::status_msg [private]
 

Definition at line 394 of file Master.h.

Referenced by consoleInThread(), Master(), msgClientStatus(), msgClientStatus_Off(), msgClientStatus_On(), msgJobCtrl(), msgJobCtrl_GetStatus(), msgJobCtrl_Stop(), msgSlaveCtrl(), msgSlaveCtrl_Upgrade(), msgSlaveReserve(), msgSlaveStatus(), msgSlaveStatus_Busy(), msgSlaveStatus_Disabled(), msgSlaveStatus_Off(), msgSlaveStatus_Ready(), msgTaskCtrl(), msgTaskCtrl_Ctrl(), msgTaskCtrl_Stop(), msgTaskFinish(), msgTaskInit(), msgTaskInit_Normal(), msgTaskInit_Reserve(), msgTaskMove(), msgTaskStatus(), msgTaskStatus_Crashed(), msgTaskStatus_Ok(), msgTaskStatus_Refused(), msgTaskStatus_Started(), print_status(), and startTask().

long Master::task_launch_timeout [private]
 

Definition at line 361 of file Master.h.

Referenced by Master(), and startTask().

int Master::threads_running [private]
 

Definition at line 353 of file Master.h.

Referenced by checkingThread(), consoleInThread(), consoleOutThread(), and Master().

int Master::totalJobs [private]
 

Definition at line 405 of file Master.h.

Referenced by Master(), msgClientStatus_On(), and print_status().

int Master::totalReservations [private]
 

Definition at line 405 of file Master.h.

Referenced by Master(), msgSlaveReserve(), and print_status().

int Master::totalTasks [private]
 

Definition at line 405 of file Master.h.

Referenced by Master(), msgTaskInit_Normal(), msgTaskInit_Reserve(), and print_status().

List Master::toUpgradeLater [private]
 

Definition at line 380 of file Master.h.

Referenced by msgSlaveCtrl_Upgrade(), msgSlaveStatus_Ready(), upgradeSlave(), and ~Master().

int Master::update_status [private]
 

Definition at line 396 of file Master.h.

Referenced by msgSlaveStatus_Ready(), and print_status().

XMLData* Master::upgradeLaterURLs [private]
 

Definition at line 382 of file Master.h.

Referenced by Master(), msgSlaveCtrl_Upgrade(), msgSlaveStatus_Ready(), and ~Master().

CharStr* Master::upgradeLaterVersion [private]
 

Definition at line 383 of file Master.h.

Referenced by Master(), msgSlaveCtrl_Upgrade(), msgSlaveStatus_Ready(), and ~Master().

qpzuserdb* Master::userdb [private]
 

Definition at line 357 of file Master.h.

Referenced by checkingThread(), Master(), verifyUserPswd(), and ~Master().

char* Master::userfile [private]
 

Definition at line 372 of file Master.h.

Referenced by checkingThread(), and Master().

long Master::userfile_reload_period [private]
 

Definition at line 373 of file Master.h.

Referenced by checkingThread(), and Master().


The documentation for this class was generated from the following files:
Generated on Mon Nov 25 12:46:39 2002 for qadpz by doxygen1.2.18