#include <pm_jobmanager.h>


Definition at line 26 of file pm_jobmanager.h.
Public Member Functions | |
| pm_JobMgr () | |
| virtual | ~pm_JobMgr () |
| i_JobID_t | Migrate (const pm_FileList &a_files, ivd_MigrationID_t a_migID, UInt64_t a_majColId, UInt64_t a_minColId, UInt32_t a_flags) |
| Creates migration Job. | |
| i_JobID_t | CreateRecallJob (const i_Recall_t &a_file) |
| Creates recall Job. | |
| i_JobID_t | CreateEfficientRecallJobs (const i_RecallList_t &a_files, i_JobID_t a_mainJobID) |
| void | EfficientRecallGetLocations (const i_RecallList_t &a_recallList, fsc_FileLocStorage &a_fileLocStorage, i_RecallList_t &a_filesWithNoCopy) |
| i_Job_i * | GetRecallJob (const UInt32_t a_mediumKey) |
| i_JobID_t | FSCRecovery (const i_StringList_t &a_volumes, i_UIMessageServer_ptr a_uims) |
| Creates FSC recovery Job. | |
| i_JobID_t | CreateFSCRecoveryJob (const i_StringList_t &a_volumes, i_UIMessageServer_ptr a_uims) |
| Collects info about volumes to be recovered and starts recovery job. | |
| i_JobID_t | CreateIVDFSRecoveryJob (i_UIMessageServer_ptr a_uims) |
| i_JobID_t | CheckFSCvsIVDFS (Int32_t a_numFilesPerBatch, Int16_t a_sysLoadPct, i_UIMessageServer_ptr a_uims) |
| i_JobID_t | CreateCheckFSCvsMediaJob (i_MediumSeqByVol_t a_volSeqByMed, bool a_autoCorrect, bool a_removeMissingOnMedia, i_UIMessageServer_ptr a_uims) |
| i_JobID_t | CreateReorgScanJob (const i_Time_t a_date, CORBA::Long a_numOfGenerations, i_UIMessageServer_ptr a_uims) |
| Reorg scan interface. | |
| i_JobID_t | CreateReorgJob (string a_barcode, vector< UInt32_t > a_volumes, i_UIMessageServer_ptr a_uims) |
| Reorg scan interface. | |
| i_JobID_t | CreateCopyContentsJob (string a_barcode, const i_VolNumList_t &a_volumes,::CORBA::Boolean a_best_effort, i_UIMessageServer_ptr a_uims) |
| CopyContents interface. | |
| i_JobID_t | CreateDelExpiredFilesJob (i_UIMessageServer_ptr a_uims) |
| Delete Expired Files. | |
| UInt64_t | GetNewMigId () |
| void | SetPMi (i_PartitionManager_i *a_iPMi) |
| i_PartitionManager_i * | GetPMi () |
Private Member Functions | |
| void | InitParams (i_JobParams &a_params, ivd_JobType_e a_jobType, i_BufType_t a_bufType) |
| void | CreateRecoveryJob (i_Resource_t a_resource, i_VolInfoList_t a_volInfoList, vector< UInt32_t > a_openVolList) |
| i_JobID_t | CreateMigrationJob (const pm_FileList &a_files, UInt64_t a_migId, UInt64_t a_majColId, UInt64_t a_minColId, UInt32_t a_flags) |
| i_JobID_t | CreateMaintJob (i_JobParams a_params, i_Resource_t a_resource, Int32_t a_numFilesPerBatch, Int16_t a_sysLoadPct, i_VolInfoList_t a_volInfoList, vector< UInt32_t > a_openVolList) |
| i_JobID_t | CreateCheckFSCvsMediumJob (i_Resource_t a_resource, i_MediumSeqByVol_t a_volSeqByMed, vector< UInt32_t > a_openVolList, bool a_autoCorrect, bool a_removeMissingOnMedia, i_UIMessageServer_ptr a_uims) |
Private Attributes | |
| log_CLASSID_m | |
| i_PartitionManager_i * | m_iPMi |
| pm_JobMgr::pm_JobMgr | ( | ) |
| pm_JobMgr::~pm_JobMgr | ( | ) | [virtual] |
| i_JobID_t pm_JobMgr::Migrate | ( | const pm_FileList & | a_files, | |
| ivd_MigrationID_t | a_migID, | |||
| UInt64_t | a_majColId, | |||
| UInt64_t | a_minColId, | |||
| UInt32_t | a_flags | |||
| ) |
Creates migration Job.
Migrate creates migration job for each group of files (grouping NYI).
Definition at line 71 of file pm_jobmgr.cpp.
References i_FSC_i::CompleteMigration(), CreateMigrationJob(), dbg_LOW, dbg_NORM, GetNewMigId(), ipc_EXEC_m, log_DBG_m, log_FUNC_m, i_PartitionManager_i::m_config, cfg_PM::m_globalTree, i_PartitionManager_i::m_iFSCi, m_iPMi, and cfg_Tree::pools.
Referenced by i_PartitionManager_i::Migrate().
00075 { 00076 log_FUNC_m(Migrate); 00081 ivd_MigrationID_t migId(a_migID); 00082 // 00083 // CR by Matej Kenda 00084 // Why is it necessary to reuse the migration ID for failed jobs that have been restarted? 00085 // What do we gain with that? 00086 // 00087 00088 ipc_EXEC_m ( 00089 if (a_migID == 0) { 00090 log_DBG_m(dbg_NORM, "Requesting new migration ID."); 00091 migId = GetNewMigId(); 00092 log_DBG_m(dbg_NORM, "Got new migration ID: " << migId); 00093 } 00094 else { 00095 log_DBG_m(dbg_LOW, 00096 "Migration was restarted. Reset FSC state for this migID."); 00097 // Inform FSC that the migration is restarted 00098 // to clean up temporary objects. 00099 // The operation doesn't fail. 00100 i_FSC_i* fsc_p = m_iPMi->m_iFSCi; 00101 fsc_p->CompleteMigration( 00102 a_migID, 00103 m_iPMi->m_config.m_globalTree.pools.size() ); 00104 } 00105 00109 // for each group { 00110 00111 return CreateMigrationJob(a_files, migId, a_majColId, a_minColId, a_flags); 00112 //} 00113 ); 00114 }


| i_JobID_t pm_JobMgr::CreateRecallJob | ( | const i_Recall_t & | a_file | ) |
Creates recall Job.
Definition at line 151 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), i_Job_i::GetJobId(), log_ERR_m, log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::Recall().
00151 { 00152 log_FUNC_m(Recall); 00153 00154 try { 00155 00156 //if (!into) 00157 //split files regarding media 00158 //prepare list of files that do not have valid copies 00159 00160 //for each medium 00161 //Get job by Medium 00162 //job is waiting for resources? 00163 // Append list of files to job 00164 //else 00165 //start recall job 00166 00167 00168 i_RecallJob_i* job = new i_RecallJob_i( *m_iPMi, 00169 *this, 00170 a_file); 00171 AddJobToList( job ); 00172 return job->GetJobId(); 00173 } 00174 catch (ivd_Exception &ie) { 00175 log_ERR_m( ie ); 00176 throw; 00177 } 00178 }


| i_JobID_t pm_JobMgr::CreateEfficientRecallJobs | ( | const i_RecallList_t & | a_files, | |
| i_JobID_t | a_mainJobID | |||
| ) |
Definition at line 180 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), dbg_DETAIL, dbg_NORM, EfficientRecallGetLocations(), i_PartitionManager_i::GetHSM(), fsc_FileLocStorage::GetNextFSLMedium(), i_DISK_BUF, log_DBG_m, log_ERR_m, log_FUNC_m, m_iPMi, and NULL.
Referenced by i_PartitionManager_i::EfficientRecall().
00180 { 00181 log_FUNC_m(CreateEfficientRecallJobs); 00182 00183 try { 00184 fsc_FileLocStorage fileLocStorage; 00185 i_RecallList_t seqFilesWithNoCopy; 00186 EfficientRecallGetLocations(a_files, 00187 fileLocStorage, 00188 seqFilesWithNoCopy); 00189 00190 ivd_MediaKey_t mediumKey; 00191 00192 fsc_FLSPerMedia* filesOnMedium_p 00193 = fileLocStorage.GetNextFSLMedium(mediumKey); 00194 00195 // One list of files for recall in HSM can trigger 00196 // more jobs in PM. We use the first job ID as the 00197 // identifier in the HSM. 00198 00199 log_DBG_m(dbg_NORM, "Job ID " << a_mainJobID << " will be used in HSM as internal index."); 00200 00201 while (filesOnMedium_p != NULL) { 00202 log_DBG_m(dbg_DETAIL, "mediumKey" << mediumKey); 00203 i_EfficientRecallJob_i* job 00204 = new i_EfficientRecallJob_i( 00205 *m_iPMi, 00206 *this, 00207 mediumKey, 00208 filesOnMedium_p, 00209 a_mainJobID); 00210 00211 AddJobToList(job); 00212 mediumKey = 0; 00213 filesOnMedium_p = fileLocStorage.GetNextFSLMedium(mediumKey); 00214 } 00215 00216 if (seqFilesWithNoCopy.length() > 0) { 00217 m_iPMi->GetHSM()->EfficientRecall( 00218 seqFilesWithNoCopy, 00219 a_mainJobID, 00220 a_mainJobID, 00221 0, 00222 i_DISK_BUF, 00223 "", 00224 false, 00225 i_DownloadAgent::_nil()); 00226 } 00227 } 00228 catch (ivd_Exception &ie) { 00229 log_ERR_m( ie ); 00230 throw; 00231 } 00232 00233 return a_mainJobID; 00234 }


| void pm_JobMgr::EfficientRecallGetLocations | ( | const i_RecallList_t & | a_recallList, | |
| fsc_FileLocStorage & | a_fileLocStorage, | |||
| i_RecallList_t & | a_filesWithNoCopy | |||
| ) |
Definition at line 236 of file pm_jobmgr.cpp.
References i_MediumPos_t::blockOffset, dbg_DETAIL, i_Recall_t::fileID, i_Recall_t::fileIdx, i_Recall_t::fileSize, i_PartitionManager_i::GetFSC(), fsc_FileLocStorage::Insert(), ipc_CATCH_IVD_THROW_CORBA_m, ipc_EXEC_m, log_DBG_m, log_FUNC_m, m_iPMi, i_PartitionManager_i::m_iRM, max, i_MediumPos_t::mediumKey, i_MediumPos_t::medVolNum, fsc_FileLocStorage::SortList(), and i_MediumPos_t::splitSize.
Referenced by CreateEfficientRecallJobs().
00238 { 00239 log_FUNC_m(EfficientRecallGetLocations); 00240 00241 CORBA::ULong max = 16; 00242 a_filesWithNoCopy.length(max); 00243 unsigned int noCopyIdx = 0; 00244 00245 i_FSC_var fsc = m_iPMi->GetFSC(); 00246 i_ResourceManager_var rm = m_iPMi->m_iRM; 00247 try { 00248 for (unsigned int i = 0; i < a_recallList.length(); ++i) { // for each file 00249 const i_Recall_t &recInfo = a_recallList[i]; 00250 log_DBG_m(dbg_DETAIL, " #, fileID, fileSize, jIdx, fIdx"); 00251 log_DBG_m(dbg_DETAIL, setw(5) << i 00252 << setw(8) << recInfo.fileID 00253 << setw(12) << recInfo.fileSize 00254 << setw(6) << recInfo.fileIdx); 00255 00256 try { 00257 i_CopiesPos_v_t_var copiesPos; 00258 ivd_MigrationID_t migID = 0; 00259 ipc_EXEC_m( 00260 copiesPos = fsc->GetCopiesPos( 00261 recInfo.fileID, 00262 migID, 00263 recInfo.fileSize ); 00264 ); 00265 00266 UInt32_t bestCopyIdx = 0; 00267 ipc_EXEC_m( 00268 bestCopyIdx = rm->GetBestCopy(copiesPos); 00269 ); 00270 00271 i_MediumPos_v_t &medium_v = copiesPos[bestCopyIdx]; 00272 00273 int splitNo = medium_v.length(); 00274 for (int s = 0; s < splitNo; s++) { 00275 i_MediumPos_t &medPos = medium_v[s]; 00276 00277 ivd_FileLocationData_t fld(medPos.blockOffset, 00278 recInfo.fileID, 00279 migID, 00280 medPos.splitSize, 00281 recInfo.fileIdx); 00282 00283 a_fileLocStorage.Insert(medPos.mediumKey, 00284 medPos.medVolNum, 00285 fld); 00286 log_DBG_m(dbg_DETAIL, "Inserted for recall; #: " << i 00287 << ", fileID: " << recInfo.fileID 00288 << ", MigID: " << migID 00289 << ", mediumKey: " << medPos.mediumKey 00290 << ", medVolNum: " << medPos.medVolNum 00291 << ", blockOffset: " << medPos.blockOffset); 00292 } 00293 } 00294 catch (ivd_Exception) { // no copies or other error. 00295 if (noCopyIdx >= a_filesWithNoCopy.maximum()) { 00296 max *= 2; 00297 a_filesWithNoCopy.length(max); 00298 } 00299 a_filesWithNoCopy[noCopyIdx] = recInfo; 00300 ++noCopyIdx; 00301 log_DBG_m(dbg_DETAIL, "Inserted for return as failed. #: " << noCopyIdx 00302 << ", fileID: " << recInfo.fileID); 00303 } 00304 } 00305 a_filesWithNoCopy.length(noCopyIdx); 00306 a_fileLocStorage.SortList(); 00307 } 00308 ipc_CATCH_IVD_THROW_CORBA_m; 00309 }


| i_JobID_t pm_JobMgr::FSCRecovery | ( | const i_StringList_t & | a_volumes, | |
| i_UIMessageServer_ptr | a_uims | |||
| ) |
Creates FSC recovery Job.
| i_JobID_t pm_JobMgr::CreateFSCRecoveryJob | ( | const i_StringList_t & | a_volumes, | |
| i_UIMessageServer_ptr | a_uims | |||
| ) |
Collects info about volumes to be recovered and starts recovery job.
Definition at line 319 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), dbg_NORM, evt_WARNING, i_Job_i::GetJobId(), ie_VOL_NOT_FOUND, ivd_Error, log_DBG_m, log_ERR_m, log_FUNC_m, log_WriteEvent(), m_iPMi, i_PartitionManager_i::m_iRM, i_PartitionManager_i::m_partName, and rmdb_MEDVOL_RECOVER.
Referenced by i_PartitionManager_i::FSCRecovery(), and i_PartitionManager_i::i_PartitionManager_i().
00320 { 00321 00322 log_FUNC_m(CreateFSCRecoveryJob); 00323 00324 try { 00325 i_MediumSeqByVol_t_var allMedVol; 00326 allMedVol = m_iPMi->m_iRM->SelectAllMediumVolByPart( 00327 CORBA::string_dup(m_iPMi->m_partName.c_str())); 00328 00329 log_DBG_m(dbg_NORM,"Found: " << allMedVol->length() << " medium"); 00330 00331 //counting media 00332 if (allMedVol->length() < 1){ 00333 //nothing to recover??? 00334 log_WriteEvent(evt_WARNING, "No media volumes to recover."); 00335 return 0; 00336 } 00337 00338 //check if any volume has recovery flag set 00339 //if yes, prepare those volumes for job into volSeqByMed 00340 00341 i_MediumSeqByVol_t volSeqByMed; 00342 //if ivdrecover -f is run a_volumes is empty 00343 if (a_volumes.length() == 0) { 00344 //get list of volumes from rmdb 00345 volSeqByMed = *(allMedVol._retn()); 00346 i_MediumSeqByVol_t tmpVolSeq; 00347 00348 //if status of volume = recovery prepare it for job into volSeqByMed 00349 UInt32_t tmpj = 0; //check if medium has changed 00350 for (UInt32_t j = 0; j < volSeqByMed.length(); j++){ 00351 for (UInt32_t k = 0; k < volSeqByMed[j].length(); k++){ 00352 if (volSeqByMed[j][k].status & rmdb_MEDVOL_RECOVER){ 00353 int mediaLength = tmpVolSeq.length(); 00354 if ((mediaLength == 0) || (tmpj < j)) { 00355 tmpVolSeq.length(++mediaLength); 00356 tmpj = j; 00357 } 00358 int volumeLength = tmpVolSeq[mediaLength - 1].length(); 00359 tmpVolSeq[mediaLength - 1].length(++volumeLength); 00360 tmpVolSeq[mediaLength - 1][volumeLength - 1] = volSeqByMed[j][k]; 00361 } 00362 } 00363 } 00364 if (tmpVolSeq.length() > 0) { 00365 //some volumes found for recovery, use only those 00366 volSeqByMed = tmpVolSeq; 00367 } 00368 } else { 00369 i_MediumVolSeq_t tmpVolSeq; 00370 00371 //recover just specified volumes 00372 bool found = false; 00373 tmpVolSeq.length( a_volumes.length() ); 00374 00375 //copy all required volumes to tmpVolSeq 00376 for (UInt32_t i = 0; i < a_volumes.length(); i++){ 00377 00378 for (UInt32_t j = 0; j < allMedVol->length(); j++){ 00379 for (UInt32_t k = 0; k < allMedVol[j].length(); k++){ 00380 if ( strcmp(allMedVol[j][k].medVolId, a_volumes[i] ) == 0 ) { 00381 tmpVolSeq[i] = allMedVol[j][k]; 00382 found = true; 00383 break; 00384 } 00385 } 00386 } 00387 if (!found){ 00388 throw ivd_Error( 00389 ie_VOL_NOT_FOUND, 00390 "Nonexistent volume was specified for recovery"); 00391 } 00392 found = false; 00393 } 00394 00395 //make new volSeqByMed out of tmpVolSeq 00396 00397 for (UInt32_t i = 0; i < tmpVolSeq.length(); i++){ 00398 00399 for (UInt32_t j = 0; j < volSeqByMed.length(); j++){ //for each medium 00400 if (volSeqByMed[j].length() > 0){ //is there a medium entry 00401 if ( strcmp(volSeqByMed[j][0].mediumBarcode, tmpVolSeq[i].mediumBarcode ) == 0 ) { //does the barcode match 00402 volSeqByMed[j].length( volSeqByMed[j].length() + 1); 00403 volSeqByMed[j][volSeqByMed[j].length() - 1] = tmpVolSeq[i]; 00404 found = true; 00405 break; 00406 } 00407 } 00408 } 00409 if (!found){ 00410 //insert new medium 00411 volSeqByMed.length(volSeqByMed.length() + 1); 00412 //set length to 1 00413 volSeqByMed[volSeqByMed.length() - 1].length(1); 00414 //set first in sequence to vol 00415 volSeqByMed[volSeqByMed.length() - 1][0] = tmpVolSeq[i]; 00416 } 00417 found = false; 00418 } 00419 } 00420 00421 i_RecoveryJob_i* job; 00422 job = new i_RecoveryJob_i( 00423 *m_iPMi, 00424 *this, 00425 volSeqByMed, 00426 a_uims); 00427 00428 AddJobToList( job ); 00429 return job->GetJobId(); 00430 } 00431 catch (ivd_Exception &ie) { 00432 log_ERR_m( ie ); 00433 throw; 00434 } 00435 }


| i_JobID_t pm_JobMgr::CreateIVDFSRecoveryJob | ( | i_UIMessageServer_ptr | a_uims | ) |
Definition at line 438 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), i_Job_i::GetJobId(), log_ERR_m, log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::IVDFSRecover().
00438 { 00439 log_FUNC_m(CreateIVDFSRecoveryJob); 00440 00441 try { 00442 i_RecreatedIVDFSJob_i* job; 00443 job = new i_RecreatedIVDFSJob_i( 00444 *this, 00445 *m_iPMi, 00446 a_uims); 00447 AddJobToList(job); 00448 return job->GetJobId(); 00449 } 00450 catch (ivd_Exception &ie) { 00451 log_ERR_m( ie ); 00452 throw; 00453 } 00454 }


| i_JobID_t pm_JobMgr::CheckFSCvsIVDFS | ( | Int32_t | a_numFilesPerBatch, | |
| Int16_t | a_sysLoadPct, | |||
| i_UIMessageServer_ptr | a_uims | |||
| ) |
Definition at line 510 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), ui_MsgWriter::DisplayWarning(), evt_WARNING, g_cmn, i_Job_i::GetJobId(), GetPMi(), ipc_EXEC_m, log_ERR_m, log_FUNC_m, log_WriteEvent(), m_iPMi, ivd_Product::m_nameShort, and cmn_Global::prod.
Referenced by i_PartitionManager_i::CheckFSCvsIVDFS().
00512 { 00513 log_FUNC_m(CheckFSCvsIVDFS); 00514 00515 string msg; 00516 // Make sure that the job is not already running. 00517 try { 00518 ipc_EXEC_m ( 00519 i_HSM_var iHSM = GetPMi()->GetHSM(); 00520 if (iHSM->IsCheckFSCvsIVDFSRunning()) { 00521 msg = "HSMFS vs. FSC consistency check already running."; 00522 log_WriteEvent(evt_WARNING, msg); 00523 ui_MsgWriter uims(a_uims); 00524 uims.DisplayWarning(msg); 00525 return 0; 00526 } 00527 ); 00528 } 00529 catch(ivd_Error) { 00530 msg = "Can't invoke " + g_cmn.prod.m_nameShort 00531 + "-HSM, probably not mounted."; 00532 log_WriteEvent(evt_WARNING, msg); 00533 ui_MsgWriter uims(a_uims); 00534 uims.DisplayWarning(msg); 00535 return 0; 00536 }; 00537 00538 try { 00539 i_FSCCheckJob_i* job; 00540 job = new i_FSCCheckJob_i( 00541 *this, 00542 *m_iPMi, 00543 a_uims, 00544 a_numFilesPerBatch, 00545 a_sysLoadPct); 00546 00547 AddJobToList(job); 00548 return job->GetJobId(); 00549 } 00550 catch (ivd_Exception &ie) { 00551 log_ERR_m( ie ); 00552 throw; 00553 } 00554 }


| i_JobID_t pm_JobMgr::CreateCheckFSCvsMediaJob | ( | i_MediumSeqByVol_t | a_volSeqByMed, | |
| bool | a_autoCorrect, | |||
| bool | a_removeMissingOnMedia, | |||
| i_UIMessageServer_ptr | a_uims | |||
| ) |
Definition at line 457 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), i_Job_i::GetJobId(), log_ERR_m, log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::CheckFSCvsMedia(), and i_PartitionManager_i::LimitedCheckFSCvsMedia().
00460 { 00461 log_FUNC_m(CreateCheckFSCvsMediaJob); 00462 00463 try { 00464 i_MediumCheckJob_i* job = new i_MediumCheckJob_i( 00465 *m_iPMi, 00466 *this, 00467 a_volSeqByMed, 00468 a_autoCorrect, 00469 a_removeMissingOnMedia, 00470 a_uims); 00471 00472 AddJobToList(job); 00473 return job->GetJobId(); 00474 } 00475 catch (ivd_Exception &ie) { 00476 log_ERR_m( ie ); 00477 throw; 00478 } 00479 }


| i_JobID_t pm_JobMgr::CreateReorgScanJob | ( | const i_Time_t | a_date, | |
| CORBA::Long | a_numOfGenerations, | |||
| i_UIMessageServer_ptr | a_uims | |||
| ) |
Reorg scan interface.
Definition at line 556 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), i_Job_i::GetJobId(), log_ERR_m, log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::ReorgScan().
00558 { 00559 log_FUNC_m(CreateReorgScanJob); 00560 00561 try { 00562 i_ReorgScanJob_i * job; 00563 job = new i_ReorgScanJob_i( *this, 00564 *m_iPMi, 00565 a_date, 00566 a_numOfGenerations, 00567 a_uims); 00568 AddJobToList(job); 00569 return job->GetJobId(); 00570 } 00571 catch (ivd_Exception &ie) { 00572 log_ERR_m( ie ); 00573 throw; 00574 } 00575 }


| i_JobID_t pm_JobMgr::CreateReorgJob | ( | string | a_barcode, | |
| vector< UInt32_t > | a_volumes, | |||
| i_UIMessageServer_ptr | a_uims | |||
| ) |
Reorg scan interface.
Reorg interface.
Definition at line 580 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), dbg_LOW, i_Job_i::GetJobId(), GetNewMigId(), ipc_EXEC_m, log_DBG_m, log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::Reorg(), and i_PartitionManager_i::ReorgByColId().
00582 { 00583 log_FUNC_m(CreateReorgJob); 00584 00585 ivd_MigrationID_t migID; 00586 ipc_EXEC_m ( migID = GetNewMigId(); ); 00587 00588 try { 00589 i_ReorgJob_i * job; 00590 job = new i_ReorgJob_i( *this, 00591 *m_iPMi, 00592 a_barcode, 00593 a_volumes, 00594 migID, 00595 a_uims); 00596 AddJobToList(job); 00597 return job->GetJobId(); 00598 } 00599 catch (ivd_Exception &ie) { 00600 log_DBG_m(dbg_LOW, ie ); 00601 throw; 00602 } 00603 }


| i_JobID_t pm_JobMgr::CreateCopyContentsJob | ( | string | a_barcode, | |
| const i_VolNumList_t & | a_volumes, | |||
| ::CORBA::Boolean | a_best_effort, | |||
| i_UIMessageServer_ptr | a_uims | |||
| ) |
CopyContents interface.
CopyContentsinterface.
Definition at line 627 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), i_Job_i::GetJobId(), log_ERR_m, log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::CopyContents().
00630 { 00631 log_FUNC_m(CreateCopyContentsJob); 00632 try { 00633 i_RedundantCopyJob_i * job; 00634 job = new i_RedundantCopyJob_i( *this, 00635 *m_iPMi, 00636 a_barcode, 00637 a_volumes, 00638 a_best_effort, 00639 a_uims); 00640 AddJobToList(job); 00641 return job->GetJobId(); 00642 } 00643 catch (ivd_Exception &ie) { 00644 log_ERR_m( ie ); 00645 throw; 00646 } 00647 }


| i_JobID_t pm_JobMgr::CreateDelExpiredFilesJob | ( | i_UIMessageServer_ptr | a_uims | ) |
Delete Expired Files.
Definition at line 608 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), i_Job_i::GetJobId(), log_ERR_m, log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::TrigDeletion().
00608 { 00609 00610 log_FUNC_m(CreateDelExpiredFilesJob); 00611 try { 00612 i_DelExpiredFilesJob_i* job; 00613 job = new i_DelExpiredFilesJob_i(*this, *m_iPMi, a_uims); 00614 AddJobToList(job); 00615 return job->GetJobId(); 00616 } 00617 catch (ivd_Exception &ie) { 00618 log_ERR_m( ie ); 00619 throw; 00620 } 00621 }


| UInt64_t pm_JobMgr::GetNewMigId | ( | ) |
Definition at line 652 of file pm_jobmgr.cpp.
References GetPMi(), ipc_EXEC_m, log_FUNC_m, m_iPMi, and i_PartitionManager_i::m_iRM.
Referenced by CreateReorgJob(), and Migrate().
00652 { 00653 00654 log_FUNC_m(GetNewMigId); 00655 00656 ipc_EXEC_m( 00657 return m_iPMi->m_iRM->GetNewMigId(GetPMi()->m_partName.c_str()); 00658 ); 00659 00660 }


| void pm_JobMgr::SetPMi | ( | i_PartitionManager_i * | a_iPMi | ) |
Definition at line 56 of file pm_jobmgr.cpp.
References log_FUNC_m, and m_iPMi.
Referenced by i_PartitionManager_i::i_PartitionManager_i().
00056 { 00057 log_FUNC_m(SetPMi); 00058 00059 m_iPMi = a_iPMi; 00060 }

| i_PartitionManager_i * pm_JobMgr::GetPMi | ( | ) |
Definition at line 62 of file pm_jobmgr.cpp.
References log_FUNC_m, and m_iPMi.
Referenced by CheckFSCvsIVDFS(), and GetNewMigId().
00062 { 00063 log_FUNC_m(GetPMi); 00064 00065 return m_iPMi; 00066 }

| void pm_JobMgr::InitParams | ( | i_JobParams & | a_params, | |
| ivd_JobType_e | a_jobType, | |||
| i_BufType_t | a_bufType | |||
| ) | [private] |
| void pm_JobMgr::CreateRecoveryJob | ( | i_Resource_t | a_resource, | |
| i_VolInfoList_t | a_volInfoList, | |||
| vector< UInt32_t > | a_openVolList | |||
| ) | [private] |
| i_JobID_t pm_JobMgr::CreateMigrationJob | ( | const pm_FileList & | a_files, | |
| UInt64_t | a_migId, | |||
| UInt64_t | a_majColId, | |||
| UInt64_t | a_minColId, | |||
| UInt32_t | a_flags | |||
| ) | [private] |
Definition at line 117 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), dbg_NORM, i_Job_i::GetJobId(), log_DBG_m, log_ERR_m, log_FUNC_m, and m_iPMi.
Referenced by Migrate().
00122 { 00123 00124 log_FUNC_m(CreateMigrationJob); 00125 log_DBG_m(dbg_NORM, "Started creation of migration job: "); 00126 00127 try { 00128 i_MigrationJob_i* job = new i_MigrationJob_i( 00129 *m_iPMi, 00130 *this, 00131 a_files, 00132 a_migId, 00133 a_majColId, 00134 a_minColId, 00135 a_flags); 00136 00137 AddJobToList( job ); 00138 return job->GetJobId(); 00139 } 00140 catch (ivd_Exception &ie) { 00141 log_ERR_m( ie ); 00142 throw; 00143 } 00144 }


| i_JobID_t pm_JobMgr::CreateMaintJob | ( | i_JobParams | a_params, | |
| i_Resource_t | a_resource, | |||
| Int32_t | a_numFilesPerBatch, | |||
| Int16_t | a_sysLoadPct, | |||
| i_VolInfoList_t | a_volInfoList, | |||
| vector< UInt32_t > | a_openVolList | |||
| ) | [private] |
| i_JobID_t pm_JobMgr::CreateCheckFSCvsMediumJob | ( | i_Resource_t | a_resource, | |
| i_MediumSeqByVol_t | a_volSeqByMed, | |||
| vector< UInt32_t > | a_openVolList, | |||
| bool | a_autoCorrect, | |||
| bool | a_removeMissingOnMedia, | |||
| i_UIMessageServer_ptr | a_uims | |||
| ) | [private] |
Definition at line 483 of file pm_jobmgr.cpp.
References job_Manager::AddJobToList(), i_Job_i::GetJobId(), log_ERR_m, log_FUNC_m, and m_iPMi.
00489 { 00490 log_FUNC_m(CreateCheckFSCvsMediumJob); 00491 00492 try { 00493 i_MediumCheckJob_i* job = new i_MediumCheckJob_i( 00494 *m_iPMi, 00495 *this, 00496 a_volSeqByMed, 00497 a_autoCorrect, 00498 a_removeMissingOnMedia, 00499 a_uims); 00500 00501 AddJobToList(job); 00502 return job->GetJobId(); 00503 } 00504 catch (ivd_Exception &ie) { 00505 log_ERR_m( ie ); 00506 throw; 00507 } 00508 }

pm_JobMgr::log_CLASSID_m [private] |
i_PartitionManager_i* pm_JobMgr::m_iPMi [private] |
Definition at line 128 of file pm_jobmanager.h.
Referenced by CheckFSCvsIVDFS(), CreateCheckFSCvsMediaJob(), CreateCheckFSCvsMediumJob(), CreateCopyContentsJob(), CreateDelExpiredFilesJob(), CreateEfficientRecallJobs(), CreateFSCRecoveryJob(), CreateIVDFSRecoveryJob(), CreateMigrationJob(), CreateRecallJob(), CreateReorgJob(), CreateReorgScanJob(), EfficientRecallGetLocations(), GetNewMigId(), GetPMi(), Migrate(), and SetPMi().
1.5.6