Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Friends

i_Job_i Class Reference
[PM and MIF jobs (infrastructure)]

#include <i_job_impl.h>

Inheritance diagram for i_Job_i:
Inheritance graph
[legend]
Collaboration diagram for i_Job_i:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 i_Job_i (job_Manager &a_jobMgr, bool a_completeOnExecFinished=false)
virtual i_JobParamsGetJobParams ()
virtual void GetNewResources (i_Index_t a_resNum)=0
virtual void AllocateDiskBuffer (i_FileSize_t a_size)
virtual i_JobRequestList_tGetFiles ()=0
virtual i_JobID_t GetJobId ()
virtual i_JobStatus_e GetJobStatus ()
virtual i_FSC_ptr GetFSC ()=0
virtual void AssignResources (const i_ResourceList_t &a_resources)
virtual i_ResourceList_tGetAllResource ()
void SetResourceBusyStatus (i_Index_t a_resNum, i_ResourceBusy_e a_resStatus)
virtual void RegisterBEA (i_BackEndAgent_ptr a_bea, i_Index_t a_beaNum)
virtual void Remove ()
virtual void MediumOperationComplete (i_Index_t a_beaNum, i_CompletionStatus_e a_status)=0
virtual i_FileLocationDataList_tGetNextRecallSet ()
virtual void FRIReadSuccess (i_Index_t a_beaNum, i_Index_t a_volNum, i_BlkOffset_t a_lastDataPos)
CORBA::Boolean IsAborted ()
void Start ()
void ActivateJob ()
bool Started ()
void SetStatus (i_JobStatus_e)
i_JobStatus_e GetStatus ()
i_Job_ptr GetJob ()
ivd_JobType_e GetJobTypeEnum () const
virtual void AbortJob ()
void Finished ()
bool IsFinished ()
void StartBea (string a_hostName, UInt32_t a_copyNum)
void ActivateBea (UInt32_t a_beaNum)
void LoadUnload (UInt32_t a_copyNum)
void WaitBea (UInt32_t a_copyNum)
void SetResRequested (UInt32_t a_resNum)
void SetResAllocatedd (UInt32_t a_resNum)
void SetResAssigned (UInt32_t a_resNum)
void SetResReleased (UInt32_t a_resNum)
void SetResBeaStarted (UInt32_t a_resNum)
void SetResProcessed (UInt32_t a_resNum)
void SetResMedOpComplete (UInt32_t a_resNum)
bool IsResMedOpComplete (UInt32_t a_resNum)
void ResetResMedOpComplete (UInt32_t a_resNum)
void WaitBeasToFinish (UInt64_t a_waitTimeOut)
void SetBeaStatus (UInt32_t a_beaNum, ivd_BeaStatus_e a_status)
ivd_BeaStatus_e GetBeaStatus (UInt32_t a_beaNum)
void InitBeaStatus (UInt32_t a_numOfElements, ivd_BeaStatus_e a_status=bs_NOT_RUNNING)
void SetResLoaded (UInt32_t a_resNum)
void ClearResStatus (UInt32_t a_resNum)
bool NeedsProcess (UInt32_t a_resNum)
void SetResources (i_ResourceList_t a_resource)
void SetResources (i_Resource_t a_resource)
const i_ResourceList_t GetResources ()
void SetPriority (CORBA::Long a_modifier)
void SetDriveProperties (UInt32_t a_copyNum)
void ReleaseResource (UInt32_t a_beaNum)
string GetJobTypeText () const
void RequestDiskBuffer (UInt64_t a_minDBSize, UInt64_t a_maxDBSize, UInt64_t &a_allocDBSize, UInt64_t a_maxDBFileSytem, job_dbgDiskBuf_e a_deleteFiles=job_DISKBUFNONE)
void ReleaseDiskBuffer ()
void SetDiskBufferWritten ()
virtual void CompleteJob (i_CompletionStatus_e a_status)=0
virtual void Execute ()=0
virtual void InitJob ()
void CheckJobValid ()
void SetJobValid ()
void SetCompletionStatus (i_CompletionStatus_e a_completionStatus)
UInt64_t AllocateDiskBuffer (UInt64_t a_currentSplitSize, UInt64_t a_remainingSplitSize, UInt64_t a_maxDiskBuffSize, UInt32_t a_blockSize, UInt64_t a_maxDiskBuff)
UInt64_t RoundUp2BlockSize (UInt64_t a_size, UInt32_t a_blockSize)
cmn_Path GetDiskBufferFileName ()
bool operator== (UInt64_t a_jobID)

Public Attributes

vector< i_BackEndAgent_var > m_activeBeas
i_CompletionStatus_e m_status
cmn_Mutex m_resource_x

Protected Member Functions

virtual ~i_Job_i ()

Protected Attributes

bool m_jobValid
job_Managerm_jobMgr
i_JobParams m_iJobParams
i_ResourceManager_var m_rm
i_Job_var m_iJob
job_Executorm_executor
cmn_Mutex m_jobParams_x
cmn_Mutex m_activate_x
cmn_Condition m_activate_c
cmn_Mutex m_registerBea_x
cmn_Condition m_registerBea_c
cmn_Mutex m_abort_x
cmn_Mutex m_finished_x
bool m_finished
bool m_aborted
bool m_dbAllocated
bool m_dbExist
bool m_dbReleased
job_dbgDiskBuf_e m_dbDeleteFiles
UInt64_t m_dbSize
cmn_ThreadCounter m_threadCounter
bool m_completeOnExecFinished
bool m_execTheadStarted
cmn_Mutex m_beasStatus_x

Private Attributes

 log_CLASSID_m
i_ResourceList_t m_resources
vector< ivd_BeaStatus_em_beasStatus

Friends

class job_Executor

Detailed Description

Definition at line 96 of file i_job_impl.h.


Constructor & Destructor Documentation

i_Job_i::i_Job_i ( job_Manager a_jobMgr,
bool  a_completeOnExecFinished = false 
)
i_Job_i::~i_Job_i (  )  [protected, virtual]

Definition at line 89 of file i_job_impl.cpp.

References bs_NOT_RUNNING, dbg_LOW, dbg_NORM, GetResources(), ipc_EXEC_m, ipc_ObjectExists(), i_JobParams::jobID, log_DBG_m, log_FUNC_m, log_WriteEvent(), log_WRN_m, m_aborted, m_activeBeas, m_beasStatus, m_beasStatus_x, m_execTheadStarted, m_executor, m_iJobParams, m_rm, m_threadCounter, NULL, ReleaseDiskBuffer(), SetBeaStatus(), and cmn_ThreadCounter::WaitAllEnd().

                  {
    log_FUNC_m(~i_Job_i);

    // Remove all Bea's which are still active
    for (UInt32_t i = 0; i < m_activeBeas.size(); i++) {

        try {
            cmn_MutexLock l(m_beasStatus_x);
            /* Some jobs don't use WaitBeasToFinish method,
            therefore m_beasStatus is empty.*/
            if (!m_beasStatus.empty()) {
                SetBeaStatus(i, bs_NOT_RUNNING);
            }
            if (ipc_ObjectExists(m_activeBeas[i])) {
                m_activeBeas[i]->Remove();
            }
            else {
                log_DBG_m(dbg_NORM, "Bea not running. Skip m_activeBeas["
                                    << i << "]->Remove()");
            }

        } catch (...) {
            //try to do as many cleanup as nesseccery
            log_DBG_m(dbg_LOW,"Error when trying to remove active Bea's " << endl);
        }
    }

    //release any unreleased resources
    try {
        ipc_EXEC_m (

            i_ResourceList_t resources = GetResources();
            //release just rows from beas that have not been release till then
            for (UInt32_t i = 0; i < resources.length(); i++){
                if (resources[i].resAssigned && ! resources[i].resReleased){

                    i_ResourceList_t relResource;
                    relResource.length(1);
                    relResource[0] = resources[i];
                    m_rm->ReleaseResource(m_iJobParams, relResource);
                }
            }
        );
    }
    catch (ivd_Exception &e){
        log_WRN_m("Releasing resources in Job Destructor " << endl << e);
    }

    //delete any unreleased diskbuffer
    ReleaseDiskBuffer();

    if (m_execTheadStarted){
        log_DBG_m(dbg_LOW,"Waiting for Exec thread to finish");
        m_threadCounter.WaitAllEnd();
        log_DBG_m(dbg_LOW,"Exec thread finished");
    } else {
        if (m_executor != NULL)
            delete m_executor;
    }

    if (m_aborted) {
        ostringstream msg;
        msg << "JOB "  << m_iJobParams.jobID << "  ABORTED.";
        log_DBG_m(dbg_LOW, msg.str());
        log_WriteEvent(msg.str(), "JOB ", m_iJobParams.jobID);
    }
}

Here is the call graph for this function:


Member Function Documentation

void i_Job_i::AbortJob (  )  [virtual]

Reimplemented in i_VvCopyJob_i, i_FSCCheckJob_i, i_RecreatedIVDFSJob_i, and i_ReorgScanJob_i.

Definition at line 376 of file i_job_impl.cpp.

References cmn_Condition::Broadcast(), dbg_NORM, ipc_EXEC_m, i_JobParams::jobID, log_DBG_m, log_FUNC_m, log_WRN_m, m_abort_x, m_aborted, m_activate_c, m_activate_x, m_iJobParams, and m_rm.

Referenced by i_ManagementInterface_i::AbortJob().

                      {
    log_FUNC_m(AbortJob);
    {
        cmn_MutexLock l(m_abort_x);
        if (m_aborted) {
            log_WRN_m("Job " << m_iJobParams.jobID << " already aborted.");
            return;
        }
        m_aborted = true;
    }

    try {
        ipc_EXEC_m(
            if (!CORBA::is_nil(m_rm)){
                log_DBG_m(dbg_NORM, "Cancelling active GetResource for Job:" << m_iJobParams.jobID);
                m_rm->CancelGetResource(m_iJobParams.jobID);
            }
        );
    }
    catch (...) {
        //ignore any exceptions
    }

    {
        cmn_MutexLock l(m_activate_x);
        m_activate_c.Broadcast();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::ActivateBea ( UInt32_t  a_beaNum  ) 

Definition at line 462 of file i_job_impl.cpp.

References evt_ERROR, ivd_BaseException::GetFriendly(), GetJobTypeText(), GetResources(), ie_JOB_FAILED, ipc_EXEC_m, IsAborted(), ivd_Error, i_JobParams::jobID, log_ERR_m, log_FUNC_m, log_WriteEvent(), m_activeBeas, m_iJobParams, SetDriveProperties(), SetResBeaStarted(), StartBea(), and WaitBea().

Referenced by i_MediumDupl_i::CheckTargetMedium(), i_ReorgJob_i::InitializeSingleVolume(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_RecallJob_i::Process(), i_MigrationJob_i::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RedundantCopyJob_i::ReadSourceData(), and i_ReorgJob_i::ReadSourceVolume().

                                          {
    log_FUNC_m(ActivateBea);

    if (IsAborted()){
        return;
    }

    SetDriveProperties(a_beaNum);

    if (CORBA::is_nil(m_activeBeas[a_beaNum])) { //is bea already active?
        try {
            StartBea( string(GetResources()[a_beaNum].driveHost),
                      a_beaNum);

            WaitBea(a_beaNum);
        }
        catch (ivd_Exception& e) {
            ostringstream os;
            os << "Error while starting BEA. (" << e.GetFriendly() << ").";
            log_WriteEvent( evt_ERROR, os.str(),
                            GetJobTypeText(), m_iJobParams.jobID);

            log_ERR_m(  "[" << m_iJobParams.jobID << "] " <<
                "Caught exception while starting BEA " << e);

            throw ivd_Error(ie_JOB_FAILED, os.str());
        }
    }
    else {
        SetResBeaStarted(a_beaNum);
    }

    if (IsAborted()){
        return;
    }

    try {
        ipc_EXEC_m (
            m_activeBeas[a_beaNum]->UseResources((GetResources())[a_beaNum]);
        );
    }
    catch (ivd_Exception& e) {
        ostringstream os;
        os << "BEA error on invoking UseResources (" << e.GetFriendly() << ").";
        log_WriteEvent( evt_ERROR, os.str(),
                        GetJobTypeText(), m_iJobParams.jobID);

        log_ERR_m(  "[" << m_iJobParams.jobID << "] " <<
                    "Caught exception while invoking UseResources " <<
                    "on active BEA: " << e);

        throw;
//        throw ivd_Error(ie_JOB_FAILED, os.str() ); // error code is not represent to callee.
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::ActivateJob (  ) 

Definition at line 345 of file i_job_impl.cpp.

References ipc_EXEC_m, log_FUNC_m, and m_iJob.

Referenced by job_Manager::AddJobToList().

                          {
    log_FUNC_m(ActivateJob);
    // Activate servant and store its reference
    ipc_EXEC_m(
        m_iJob = this->_this();
        this->_remove_ref();
    );
}

Here is the caller graph for this function:

void i_Job_i::AllocateDiskBuffer ( i_FileSize_t  a_size  )  [virtual]

Reimplemented in i_AdminJob_i, and i_BackupJob_i.

Definition at line 1073 of file i_job_impl.cpp.

References ie_NYI, ivd_Error, and log_FUNC_m.

Referenced by AllocateDiskBuffer(), i_ReorgJob_i::Execute(), i_RedundantCopyJob_i::Execute(), and i_EfficientRecallJob_i::Execute().

                                                   {
    log_FUNC_m(AllocateDiskBuffer);
    throw ivd_Error(ie_NYI, "Method not implemented.");

}

Here is the caller graph for this function:

UInt64_t i_Job_i::AllocateDiskBuffer ( UInt64_t  a_currentSplitSize,
UInt64_t  a_remainingSplitSize,
UInt64_t  a_maxDiskBuffSize,
UInt32_t  a_blockSize,
UInt64_t  a_maxDiskBuff 
)

Definition at line 1083 of file i_job_impl.cpp.

References AllocateDiskBuffer(), dbg_DETAIL, log_DBG_m, log_FUNC_m, RequestDiskBuffer(), and RoundUp2BlockSize().

                                                             {
    log_FUNC_m(AllocateDiskBuffer);

    ostringstream msg;

    log_DBG_m(dbg_DETAIL, "Max disk buffer space: " << a_maxDiskBuffSize);

    UInt64_t diskBufferSpace5 = (a_maxDiskBuffSize / 20); // 5%
    UInt64_t diskBufferSpace50 = (a_maxDiskBuffSize / 2); // 50%
    UInt64_t maxSpace2Allocate = diskBufferSpace50;
    UInt64_t minSpace2Allocate = diskBufferSpace5;

    UInt64_t currentSplitSize = RoundUp2BlockSize(
                                        a_currentSplitSize,
                                        a_blockSize);

    UInt64_t remainingSplitSize = RoundUp2BlockSize(
                                        a_remainingSplitSize,
                                        a_blockSize);

    // Check if size of first file in list is greather than minSpace2Allocate
    // If so allocate at least size of first file
    if (currentSplitSize > minSpace2Allocate) {
        minSpace2Allocate = currentSplitSize;
    }

    // Check if size of remaining split is less than maxSpace2Allocate
    // No need to allocate more then we need
    if (maxSpace2Allocate > remainingSplitSize) {
        maxSpace2Allocate = remainingSplitSize;
    }
    // If remaining split size is less than 5%
    // No need to allocate more then we need
    if (maxSpace2Allocate < diskBufferSpace5) {
        minSpace2Allocate = maxSpace2Allocate;
    }
    // If size of first file in list is greather than 50% of disk buffer
    if (minSpace2Allocate > diskBufferSpace50) {
        maxSpace2Allocate = minSpace2Allocate;
    }

    log_DBG_m(dbg_DETAIL,   "Min disk buffer space to allocate: " <<
                            minSpace2Allocate);
    log_DBG_m(dbg_DETAIL,   "Max disk buffer space to allocate: " <<
                            maxSpace2Allocate);

    UInt64_t diskBufferSpaceAllocated(0);
    RequestDiskBuffer(  minSpace2Allocate,
                        maxSpace2Allocate,
                        diskBufferSpaceAllocated,
                        a_maxDiskBuff);

    return diskBufferSpaceAllocated;
}

Here is the call graph for this function:

void i_Job_i::AssignResources ( const i_ResourceList_t a_resources  )  [virtual]

Reimplemented in i_MediumDupl_i, i_MigrationJob_i, and i_ThreadJob_i.

Definition at line 238 of file i_job_impl.cpp.

References cmn_Condition::Broadcast(), cmn_Num2Str(), dbg_LOW, ie_JOB_REMOVED, ie_NYI, IsAborted(), ivd_Error, i_JobParams::jobID, log_DBG_m, log_FUNC_m, ipc_Log::LogResources(), m_activate_c, m_activate_x, m_iJobParams, m_resource_x, and m_resources.

                                                                {
    log_FUNC_m(AssignResources);

    try {
        log_DBG_m(dbg_LOW,"[" << m_iJobParams.jobID <<
                          "] " << "Job got Resources:" << endl <<
            ipc_Log::LogResources(a_resources) );

        if (a_resources.length() != 1){
            throw ivd_InternalError(ie_NYI, "Multiple assignment not possible");
        }

        if (IsAborted()){
            cmn_MutexLock l(m_activate_x);
            m_activate_c.Broadcast();
            throw ivd_Error(ie_JOB_REMOVED,
                            cmn_Num2Str(m_iJobParams.jobID).c_str());
        };

        {
            cmn_MutexLock l(m_resource_x);
            m_resources[a_resources[0].resNum] = a_resources[0];
            m_resources[a_resources[0].resNum].resAssigned = true;
        }


        cmn_MutexLock l(m_activate_x);
        m_activate_c.Broadcast();

    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_Job_i::CheckJobValid (  ) 

Definition at line 1060 of file i_job_impl.cpp.

References ie_PRECONDITION, log_FUNC_m, and m_jobValid.

Referenced by job_Manager::AddJobToList().

                           {
    log_FUNC_m(CheckJobValid);
    if (!m_jobValid){
        throw ivd_InternalError(ie_PRECONDITION,
            "Job was not initialized properly.", true);
    }
}

Here is the caller graph for this function:

void i_Job_i::ClearResStatus ( UInt32_t  a_resNum  ) 

Definition at line 772 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

Referenced by i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_RedundantCopyJob_i::MediumOperationComplete(), and i_ReorgJob_i::RecallFiles().

                                             {
    log_FUNC_A_m(ClearResStatus, "[" << m_iJobParams.jobID << "] a_resNum:"
        << a_resNum);
    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    m_resources[a_resNum].resRequested  = false;
    m_resources[a_resNum].resAllocated  = false;
    m_resources[a_resNum].resReleased   = false;
    m_resources[a_resNum].resAssigned   = false;
    m_resources[a_resNum].resBeaStarted = false;
    m_resources[a_resNum].resProcessed  = false;
    m_resources[a_resNum].resMedOpComplete = false;
    m_resources[a_resNum].load = false;
}

Here is the caller graph for this function:

virtual void i_Job_i::CompleteJob ( i_CompletionStatus_e  a_status  )  [pure virtual]
virtual void i_Job_i::Execute (  )  [pure virtual]
void i_Job_i::Finished (  ) 

Definition at line 418 of file i_job_impl.cpp.

References IsFinished(), log_FUNC_m, m_finished, and m_finished_x.

Referenced by i_VvCopyJob_i::Execute(), i_AdminJob_i::Execute(), and i_MediumDupl_i::MediumOperationComplete().

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::FRIReadSuccess ( i_Index_t  a_beaNum,
i_Index_t  a_volNum,
i_BlkOffset_t  a_lastDataPos 
) [virtual]

Reimplemented in i_MaintFriJob_i.

Definition at line 318 of file i_job_impl.cpp.

References ie_NYI, ivd_Error, and log_FUNC_m.

                                                            {
    log_FUNC_m(FRIReadSuccess);
    throw ivd_Error(ie_NYI, "Method not implemented.");
}

i_ResourceList_t * i_Job_i::GetAllResource (  )  [virtual]

Definition at line 198 of file i_job_impl.cpp.

References log_FUNC_m, and m_resources.

                                          {
    log_FUNC_m(GetAllResource);

    try {
        //log_FUNC_m(GetAllResource);
        i_ResourceList_t *resources = new i_ResourceList_t;
        *resources = m_resources;
        /*log_DBG_m(dbg_NORM,"GetAllResources will return:" << endl <<
                        ipc_Log::LogResources(*resources) );*/
        return resources;
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

ivd_BeaStatus_e i_Job_i::GetBeaStatus ( UInt32_t  a_beaNum  ) 

Definition at line 1264 of file i_job_impl.cpp.

References dbg_DETAIL, GetJobId(), ie_FATAL_ERROR, ivd_BeaStatusToText(), log_DBG_m, log_FUNC_m, and m_beasStatus.

Referenced by WaitBeasToFinish().

                                                       {
    log_FUNC_m(GetBeaStatus);

    if (a_beaNum >= m_beasStatus.size()) {
        throw ivd_InternalError(ie_FATAL_ERROR,
                                "Job requesting status of non existing BEA.");
    }
    log_DBG_m(dbg_DETAIL, "Job: " << GetJobId());
    log_DBG_m(dbg_DETAIL, "Status of BEA: " << a_beaNum << " is "
                          << ivd_BeaStatusToText(m_beasStatus[a_beaNum]));

    return m_beasStatus[a_beaNum];

}

Here is the call graph for this function:

Here is the caller graph for this function:

cmn_Path i_Job_i::GetDiskBufferFileName (  ) 

Definition at line 228 of file i_job_impl.cpp.

References cmn_Num2Str(), dbg_DETAIL, i_JobParams::diskBufferFS, GetJobId(), log_DBG_m, log_FUNC_m, and m_iJobParams.

Referenced by i_MigrationJob_i::Execute(), i_EfficientRecallJob_i::MediumOperationComplete(), ReleaseDiskBuffer(), and pm_RecallClientThread::Run().

                                       { //relative
    log_FUNC_m(GetDiskBufferFileName);

    cmn_Path tmpName(m_iJobParams.diskBufferFS);
    tmpName += cmn_Num2Str(GetJobId());

    log_DBG_m(dbg_DETAIL, "GetDiskBufferFileName: " << tmpName);
    return tmpName;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual i_JobRequestList_t* i_Job_i::GetFiles (  )  [pure virtual]
virtual i_FSC_ptr i_Job_i::GetFSC (  )  [pure virtual]
i_Job_ptr i_Job_i::GetJob (  ) 

Definition at line 367 of file i_job_impl.cpp.

References ipc_EXEC_m, log_FUNC_m, and m_iJob.

Referenced by mif_JobManager::CreateBackupJob(), i_PartitionManager_i::GetJob(), and i_ManagementInterface_i::ListJob().

                          {
    log_FUNC_m(GetJob);

    ipc_EXEC_m(
        i_Job_ptr tmpJob = i_Job::_duplicate(m_iJob);
        return tmpJob;
    );
}

Here is the caller graph for this function:

i_JobID_t i_Job_i::GetJobId (  )  [virtual]
i_JobParams * i_Job_i::GetJobParams (  )  [virtual]

Definition at line 159 of file i_job_impl.cpp.

References dbg_NORM, ivd_BaseException::GetError(), ipc_EXEC_m, i_JobParams::jobID, log_DBG_m, log_FUNC_m, m_iJobParams, m_resource_x, m_resources, and m_rm.

                                   {
    log_FUNC_m(GetJobParams);

    try {
        i_JobParams *params = new i_JobParams;
        *params = m_iJobParams;
        //log_DBG_m(dbg_DETAIL,"GetJobParams will return:" << endl <<
        //                  ipc_Log::LogJobParams(*params) );


        // refresh with newest params if some resources are waiting


        i_ResourceList_t_var resources;
        try {
            ipc_EXEC_m(
                resources = m_rm->GetJobResources(m_iJobParams.jobID);
            );
            for (UInt32_t i(0); i < resources->length(); i++) {
                {
                    cmn_MutexLock l(m_resource_x);
                    m_resources[resources[i].resNum] = resources[i];
                }
            }
        } catch (ivd_Exception &e) {
            if (e.GetError() == ie_JOBNOTFOUND) {
                //expected
                log_DBG_m(dbg_NORM, "No such job in rm queue.");
            } else {
                log_DBG_m(dbg_NORM, "Error: " << e.GetError() );
                throw e;
            }
        }

        return params;
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

virtual i_JobStatus_e i_Job_i::GetJobStatus (  )  [inline, virtual]

Definition at line 114 of file i_job_impl.h.

References m_iJobParams, and i_JobParams::status.

{ return m_iJobParams.status; };

ivd_JobType_e i_Job_i::GetJobTypeEnum (  )  const [inline]

Definition at line 150 of file i_job_impl.h.

References i_JobParams::jobType, and m_iJobParams.

Referenced by job_Manager::AddJobToList(), and GetJobTypeText().

                                                   { 
                                return static_cast<ivd_JobType_e>(m_iJobParams.jobType); 
                            }

Here is the caller graph for this function:

string i_Job_i::GetJobTypeText (  )  const
virtual void i_Job_i::GetNewResources ( i_Index_t  a_resNum  )  [pure virtual]
i_FileLocationDataList_t * i_Job_i::GetNextRecallSet (  )  [virtual]

Reimplemented in i_RecallJob_i, i_EfficientRecallJob_i, i_RedundantCopyJob_i, and i_ReorgJob_i.

Definition at line 312 of file i_job_impl.cpp.

References ie_FATAL_ERROR, and log_FUNC_m.

                                                   {
    log_FUNC_m(GetNextRecallSet);
    throw ivd_InternalError(ie_FATAL_ERROR, "method not implemented");
    return NULL;
}

const i_ResourceList_t i_Job_i::GetResources (  ) 

Definition at line 827 of file i_job_impl.cpp.

References log_FUNC_m, m_resource_x, and m_resources.

Referenced by ActivateBea(), i_MediumDupl_i::AssignResources(), i_MediumDupl_i::CheckTargetMedium(), i_AdminJob_i::CloseVolume(), i_RecallJob_i::CompleteJob(), i_MigrationJob_i::CompleteJob(), i_MediumDupl_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_VvCopyJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_MaintFriJob_i::Execute(), i_BackupJob_i::Execute(), i_AdminJob_i::Execute(), i_MaintFriJob_i::FRIReadSuccess(), i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_MaintFriJob_i::GetNewResources(), i_BackupJob_i::GetNewResources(), i_AdminJob_i::GetNewResources(), i_BackupJob_i::i_BackupJob_i(), i_MaintFriJob_i::i_MaintFriJob_i(), i_MediumCheckJob_i::i_MediumCheckJob_i(), i_MediumDupl_i::i_MediumDupl_i(), i_MigrationJob_i::i_MigrationJob_i(), i_RecoveryJob_i::i_RecoveryJob_i(), i_RedundantCopyJob_i::i_RedundantCopyJob_i(), i_ReorgJob_i::i_ReorgJob_i(), i_ReorgJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), i_AdminJob_i::InitJob(), LoadUnload(), i_ReorgJob_i::MediumOperationComplete(), i_RedundantCopyJob_i::MediumOperationComplete(), i_RecallJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_MaintFriJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_RecallJob_i::PrepareResource(), i_EfficientRecallJob_i::PrepareResource(), i_BackupJob_i::PrepareResource(), i_RecallJob_i::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RecoveryJob_i::ProcessFRI(), i_MediumCheckJob_i::ProcessFRI(), i_ReorgJob_i::ReadSourceVolume(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), ReleaseResource(), i_RecallJob_i::ReleaseResources(), i_MaintFriJob_i::ReleaseResources(), i_EfficientRecallJob_i::ReleaseResources(), i_MaintFriJob_i::RequestResources(), pm_RecallClientThread::Run(), i_ReorgJob_i::SetResourceBusyStatus(), i_RedundantCopyJob_i::SetResourceBusyStatus(), i_MediumDupl_i::SetResourceBusyStatus(), i_AdminJob_i::SetResourceBusyStatus(), i_AdminJob_i::StartBEA(), and ~i_Job_i().

i_JobStatus_e i_Job_i::GetStatus (  ) 

Definition at line 362 of file i_job_impl.cpp.

References m_iJobParams, m_jobParams_x, and i_JobParams::status.

Referenced by Started().

Here is the caller graph for this function:

void i_Job_i::InitBeaStatus ( UInt32_t  a_numOfElements,
ivd_BeaStatus_e  a_status = bs_NOT_RUNNING 
)

Definition at line 1279 of file i_job_impl.cpp.

References dbg_DETAIL, ivd_BeaStatusToText(), log_DBG_m, log_FUNC_m, and m_beasStatus.

Referenced by i_EfficientRecallJob_i::i_EfficientRecallJob_i(), i_MaintFriJob_i::i_MaintFriJob_i(), i_MediumDupl_i::i_MediumDupl_i(), i_MigrationJob_i::i_MigrationJob_i(), i_RecallJob_i::i_RecallJob_i(), i_RedundantCopyJob_i::i_RedundantCopyJob_i(), and i_ReorgJob_i::i_ReorgJob_i().

                                                                              {
    log_FUNC_m(InitBeaStatus);

    log_DBG_m(dbg_DETAIL, "m_beasStatus resized to "
                          << a_numOfElements
                          << " elements and init to "
                          << ivd_BeaStatusToText(a_status));
    m_beasStatus.resize(a_numOfElements);
    for (UInt32_t i(0); i < a_numOfElements; ++i) {
        m_beasStatus[i] = a_status;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::InitJob (  )  [virtual]

Reimplemented in i_AdminJob_i.

Definition at line 1055 of file i_job_impl.cpp.

References log_FUNC_m, and SetJobValid().

Referenced by job_Manager::AddJobToList().

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Boolean i_Job_i::IsAborted (  ) 

Definition at line 406 of file i_job_impl.cpp.

References dbg_DETAIL, i_JobParams::jobID, log_DBG_m, log_FUNC_m, m_abort_x, m_aborted, and m_iJobParams.

Referenced by ActivateBea(), AssignResources(), i_AdminJob_i::CloseVolume(), i_MediumCheckJob_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_EfficientRecallJob_i::CompleteJob(), i_BackupJob_i::CompleteJob(), i_AdminJob_i::DetectVolumeHeader(), i_VvCopyJob_i::Execute(), i_ReorgJob_i::Execute(), i_RedundantCopyJob_i::Execute(), i_RecallJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_MediumCheckJob_i::Execute(), i_MaintFriJob_i::Execute(), i_EfficientRecallJob_i::Execute(), i_BackupJob_i::Execute(), i_AdminJob_i::Execute(), i_AdminJob_i::Format(), i_MaintFriJob_i::FRIReadSuccess(), i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_AdminJob_i::Initialize(), i_ReorgJob_i::InitializeVolumes(), LoadUnload(), i_ReorgJob_i::MediumOperationComplete(), i_RedundantCopyJob_i::MediumOperationComplete(), i_RecallJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_MaintFriJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_AdminJob_i::OperateLA(), i_RecallJob_i::Process(), i_MigrationJob_i::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RedundantCopyJob_i::ReadSourceData(), i_ReorgJob_i::ReadSourceVolume(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), i_MaintFriJob_i::RecreateFRI(), i_AdminJob_i::RecreateFRIandMIC(), ReleaseDiskBuffer(), RequestDiskBuffer(), i_MaintFriJob_i::RequestResources(), job_Executor::Run(), i_AdminJob_i::StartBEA(), WaitBea(), i_AdminJob_i::~i_AdminJob_i(), i_MigrationJob_i::~i_MigrationJob_i(), i_RecoveryJob_i::~i_RecoveryJob_i(), i_ReorgJob_i::~i_ReorgJob_i(), and job_Executor::~job_Executor().

bool i_Job_i::IsFinished (  ) 
bool i_Job_i::IsResMedOpComplete ( UInt32_t  a_resNum  ) 

Definition at line 760 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

                                                  {
    log_FUNC_A_m(IsResMedOpComplete, "[" << m_iJobParams.jobID << "] a_resNum:"
            << a_resNum);

    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    return m_resources[a_resNum].resMedOpComplete;
}

void i_Job_i::LoadUnload ( UInt32_t  a_copyNum  ) 

Definition at line 518 of file i_job_impl.cpp.

References rm_Resource_t::barcode, rm_Resource_t::Convert2Corba(), dbg_DETAIL, dbg_NORM, rm_Resource_t::driveIndex, evt_ERROR, ivd_BaseException::GetError(), ivd_BaseException::GetFriendly(), GetJobTypeText(), GetResources(), ie_JOB_FAILED, ipc_EXEC_m, IsAborted(), ivd_Error, i_JobParams::jobID, rm_Resource_t::libraryHost, rm_Resource_t::libraryName, rm_Resource_t::load, rm_Resource_t::loadSlotAddr, log_DBG_m, log_ERR_m, log_FUNC_m, log_WriteEvent(), ipc_Log::LogResources(), m_iJobParams, ipc_Corba::ResolveLA(), SetResLoaded(), rm_Resource_t::unloadBarcode, and rm_Resource_t::unloadSlotAddr.

Referenced by i_MediumDupl_i::CheckTargetMedium(), i_ReorgJob_i::InitializeVolumes(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_AdminJob_i::OperateLA(), i_BackupJob_i::PrepareResource(), i_RecallJob_i::Process(), i_MigrationJob_i::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RedundantCopyJob_i::ReadSourceData(), and i_ReorgJob_i::ReadSourceVolume().

                                          {
    log_FUNC_m(LoadUnload);

    rm_Resource_t resource;
    resource = (GetResources())[a_copyNum];

    if (resource.load) { //some tape moves have to be done
        i_LibraryAgent_var iLA;

        if (IsAborted()) return;
        try {
            ipc_EXEC_m (
                CORBA::Object_var objLA = ipc_Corba::ResolveLA(
                    resource.libraryHost,
                    resource.libraryName);

                iLA = i_LibraryAgent::_narrow(objLA)
             );
        } catch (ivd_Error &e) {

            log_ERR_m("[" << m_iJobParams.jobID << "] " <<
                "Caught exception when resolving LA" << e);

            ostringstream os;
            os << "Failed, LA Resolve error (" << e.GetFriendly() << ").";
            log_WriteEvent(evt_ERROR, os.str(),
                GetJobTypeText(), m_iJobParams.jobID);

            throw ivd_Error(ie_JOB_FAILED, os.str());
        }

        if (IsAborted()) return;

        if (resource.load) {  //unload has to be done
            if (!resource.unloadBarcode.empty()) { //call Library Agent for unload
                log_DBG_m(dbg_DETAIL,"LA unload");
                try {

                    ipc_EXEC_m (iLA->Unload(
                                        resource.driveIndex.c_str(),
                                        resource.unloadSlotAddr.c_str(),
                                        resource.unloadBarcode.c_str(),
                                        m_iJobParams.jobID
                                        );
                    );
                } catch (ivd_Error &e) {
                    i_Resource_t resourceToBePrinted = resource.Convert2Corba();

                    log_ERR_m(ipc_Log::LogResources(resourceToBePrinted)  << endl <<
                        "[" << m_iJobParams.jobID << "] " <<
                        "Caught exception on LA unload " << e);
                    ostringstream os;
                    os << "Failed, LA unload error (" << e.GetFriendly() << ").";
                    log_WriteEvent(evt_ERROR, os.str(),
                        GetJobTypeText(), m_iJobParams.jobID);

                    if (e.GetError() == ie_SCSI_HWERR) {
                        throw;
                    }
                    else {
                        throw ivd_Error(ie_JOB_FAILED, os.str());
                    }
                }
            }
        }

        if (IsAborted()) return;

        if (!resource.barcode.empty()) { //call Library Agent load
            log_DBG_m(dbg_DETAIL,"LA Load");
            try {
                ipc_EXEC_m (iLA->Load(
                                    resource.loadSlotAddr.c_str(),
                                    resource.driveIndex.c_str(),
                                    resource.barcode.c_str(),
                                    m_iJobParams.jobID
                                    );
                );
            } catch (ivd_Error &e) {
                log_ERR_m(  "[" << m_iJobParams.jobID << "] " <<
                    "Caught exception on LA load " << e);
                ostringstream os;
                os << "Failed, LA load error (" << e.GetFriendly() << ").";
                log_WriteEvent(evt_ERROR, os.str(),
                    GetJobTypeText(), m_iJobParams.jobID);

                throw ivd_Error(ie_JOB_FAILED, os.str());
            }

        }
        SetResLoaded(a_copyNum);
    }
    else {
        log_DBG_m(dbg_NORM,"[" << m_iJobParams.jobID <<
            "] " << "Medium is already in drive, "
            "no need for load/unload");
    }

}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void i_Job_i::MediumOperationComplete ( i_Index_t  a_beaNum,
i_CompletionStatus_e  a_status 
) [pure virtual]
bool i_Job_i::NeedsProcess ( UInt32_t  a_resNum  ) 
bool i_Job_i::operator== ( UInt64_t  a_jobID  )  [inline]

Definition at line 222 of file i_job_impl.h.

References GetJobId().

                                       {
        return this->GetJobId() == a_jobID;
    }

Here is the call graph for this function:

void i_Job_i::RegisterBEA ( i_BackEndAgent_ptr  a_bea,
i_Index_t  a_beaNum 
) [virtual]

Definition at line 293 of file i_job_impl.cpp.

References cmn_Condition::Broadcast(), dbg_DETAIL, ie_FATAL_ERROR, log_DBG_m, log_FUNC_m, m_activeBeas, m_registerBea_c, and m_registerBea_x.

                                                                      {
    log_FUNC_m(RegisterBEA);

    try {

        log_DBG_m(dbg_DETAIL,"Bea (" << a_beaNum << ") registering to Job");

        if (a_beaNum < static_cast<i_Index_t>(m_activeBeas.size()) ) {
            cmn_MutexLock l(m_registerBea_x);
            m_activeBeas[a_beaNum] = i_BackEndAgent::_duplicate(a_bea);
            m_registerBea_c.Broadcast();
        } else {
            throw ivd_InternalError(
                ie_FATAL_ERROR, "Unexpected BEA wanted to be registered.");
        }

    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_Job_i::ReleaseDiskBuffer (  ) 

Definition at line 994 of file i_job_impl.cpp.

References dbg_LOW, dbg_NORM, dt_DISKBUF, g_cmn, GetDiskBufferFileName(), GetJobId(), i_DATA_ERROR, ipc_EXEC_m, IsAborted(), job_DISKBUFALL, job_DISKBUFCORRUPT, job_DISKBUFNONE, i_JobParams::jobID, log_DBG_m, log_ERR_m, log_FUNC_m, log_WRN_m, m_dbAllocated, m_dbDeleteFiles, m_dbExist, m_dbReleased, cmn_SysInfo::m_hostName, m_iJobParams, m_rm, m_status, ipc_Corba::ResolveSvc(), and cmn_Global::si.

Referenced by i_EfficientRecallJob_i::CompleteJob(), i_ReorgJob_i::DiskBufferCleanup(), i_MigrationJob_i::Execute(), i_RedundantCopyJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), i_RecallJob_i::RecallRetry(), ~i_Job_i(), i_MediumDupl_i::~i_MediumDupl_i(), i_MigrationJob_i::~i_MigrationJob_i(), i_RecallJob_i::~i_RecallJob_i(), and i_RedundantCopyJob_i::~i_RedundantCopyJob_i().

                               {

    log_FUNC_m(ReleaseDiskBuffer);

    switch (m_dbDeleteFiles){
        case(job_DISKBUFALL):
            log_DBG_m(dbg_NORM, "" << GetJobId() <<
                " Skipping deleting of all diskbuffer.");
            break;
        case(job_DISKBUFCORRUPT):
            if (m_status == i_DATA_ERROR) {
                log_DBG_m(dbg_NORM, "" << GetJobId() <<
                    " Skipping deleting of diskbuffer w/i_DATA_ERROR.");
                break;
            };
        case(job_DISKBUFNONE):
        default:
            try {
                ipc_EXEC_m(
                    if (m_dbExist || IsAborted()){
                        log_DBG_m(dbg_NORM, "" << GetJobId() <<
                                    " will delete diskbuffer.");
                        CORBA::Object_var obj =
                        ipc_Corba::ResolveSvc(g_cmn.si.m_hostName);
                        i_Service_var svc = i_Service::_narrow(obj);

                        svc->DeleteFile(dt_DISKBUF,
                                        GetDiskBufferFileName().c_str());
                        m_dbExist = false;
                    } else {
                        log_DBG_m(dbg_NORM, "" << GetJobId() <<
                            " Diskbuffer does not exist.");
                    };
                );
            }
            catch (ivd_Exception &e){
                //ignore
                log_DBG_m(dbg_LOW, "[" << m_iJobParams.jobID <<
                    "] " << "Error Erasing disk buffer." << endl << e);
            }
            try {
                ipc_EXEC_m (
                    if (m_dbAllocated & !m_dbReleased) {
                        m_rm->ReleaseDiskBuffer(GetJobId());
                        m_dbReleased = true;
                    }
                );
            } catch (ivd_Exception &e){
                log_WRN_m("Error while releasing DiskBuffer space. " << e)
            } catch (...){
                log_ERR_m("Unknown error while releasing DiskBuffer space.");

            }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::ReleaseResource ( UInt32_t  a_beaNum  ) 

Definition at line 856 of file i_job_impl.cpp.

References dbg_LOW, dbg_NORM, GetResources(), ie_PRECONDITION, ipc_EXEC_m, ivd_Error, i_JobParams::jobID, log_DBG_m, log_ERR_m, log_FUNC_m, m_iJobParams, m_rm, i_JobParams::phase, and SetResReleased().

Referenced by i_MediumDupl_i::CheckTargetMedium(), i_ReorgJob_i::MediumOperationComplete(), i_RedundantCopyJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), and i_ReorgJob_i::RecallFiles().

                                              {
    log_FUNC_m(ReleaseResource);

    i_ResourceList_t relResource;
    relResource.length(1);
    relResource[0] = (GetResources())[a_beaNum];
    if (!relResource[0].resAllocated){
        throw ivd_Error(ie_PRECONDITION, "Resource were not allocated.");
    }
    SetResReleased(a_beaNum);

    try {
        ipc_EXEC_m(

            try {
                m_rm->SetPhase(m_iJobParams.jobID, m_iJobParams.phase++);
            } catch (...){
                //ignore any exceptions here
            }

            log_DBG_m(dbg_LOW, "[" << m_iJobParams.jobID <<
                               "] " << "ReleaseResource for jobId:" );
            m_rm->ReleaseResource(m_iJobParams, relResource);
        );

    } catch (ivd_Exception& e) {
        log_ERR_m("Caught exception in ReleaseResource: " << e);
    } catch (...){
        log_ERR_m("Caught UNKNOWN EXCEPTION " );
    }

    log_DBG_m(dbg_NORM, "Resources Released for jobId" <<
                        m_iJobParams.jobID);


}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::Remove (  )  [virtual]
void i_Job_i::RequestDiskBuffer ( UInt64_t  a_minDBSize,
UInt64_t  a_maxDBSize,
UInt64_t a_allocDBSize,
UInt64_t  a_maxDBFileSytem,
job_dbgDiskBuf_e  a_deleteFiles = job_DISKBUFNONE 
)

Definition at line 901 of file i_job_impl.cpp.

References cfg_MEGABYTE, dbg_LOW, dbg_NORM, i_JobParams::diskBufferFS, evt_WARNING, GetJobId(), GetJobTypeText(), ie_IMPOSSIBLE, ie_NO_DISK_SPACE, ipc_EXEC_m, IsAborted(), ivd_Error, ivd_Sleep, i_JobParams::jobID, i_JobParams::jobType, log_DBG_m, log_FUNC_A_m, log_WriteEvent(), m_dbAllocated, m_dbDeleteFiles, m_dbReleased, m_dbSize, m_iJobParams, m_rm, m_status, and TIMEOUT_NOT_ENOUGH_SPACE_DISKBUFFER.

Referenced by AllocateDiskBuffer(), i_BackupJob_i::AllocateDiskBuffer(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), and i_RecallJob_i::PrepareResource().

                                                               {

    log_FUNC_A_m(RequestDiskBuffer,
        "min: " << a_minDBSize << " max: " << a_maxDBSize
        << " maxDBFS: " << a_maxDBFileSytem);

    if ( (a_maxDBSize ==0 ) || (a_minDBSize == 0) ) {
        throw ivd_InternalError(ie_IMPOSSIBLE,
            "Job requested 0 bytes of disk buffer.");
    }

    if (a_minDBSize > a_maxDBFileSytem){

        log_DBG_m(dbg_NORM, "a_minDBSize: " << a_minDBSize <<
                            ", a_maxDBSize: " << a_maxDBSize);
        m_status = i_RESOURCE_ERROR;
        ostringstream sstr;
        sstr << "Job [" << m_iJobParams.jobID <<
                "]: Disk buffer allocation failed. See error.log for details. ";
        log_WriteEvent(sstr.str());

        sstr.str("");
        sstr << "Job [" << m_iJobParams.jobID <<
                "]: Disk buffer allocation failed. " << endl <<
                "Job requested from " << a_minDBSize/cfg_MEGABYTE << "MB" <<
                " to " << a_maxDBSize/cfg_MEGABYTE << "MB." <<
                " The size of the biggest diskbuffer file system is: " <<
                a_maxDBFileSytem/cfg_MEGABYTE << "MB.";

        throw ivd_Error(ie_NO_DISK_SPACE, sstr.str());
    }

    m_dbDeleteFiles = a_deleteFiles;
    bool reported(false);
    try {
        ipc_EXEC_m(
            m_iJobParams.diskBufferFS = m_rm->ReserveDiskBuffer(
                                                    GetJobId(),
                                                    a_minDBSize,
                                                    a_maxDBSize,
                                                    a_allocDBSize,
                                                    m_iJobParams.jobType);

            m_dbSize = a_allocDBSize;

            while (m_dbSize == 0)  {
                if (!reported){
                    log_WriteEvent(
                        evt_WARNING,
                        "Not enough disk buffer space to allocate. Waiting...",
                        GetJobTypeText(),
                        m_iJobParams.jobID);
                    reported = true;
                }

                log_DBG_m(dbg_LOW,  "[" << m_iJobParams.jobID <<
                    "] " <<
                    "Waiting for space for DiskBuffer ...");
                ivd_Sleep(TIMEOUT_NOT_ENOUGH_SPACE_DISKBUFFER);

                if (IsAborted()){
                    return;
                }
                m_iJobParams.diskBufferFS = m_rm->ReserveDiskBuffer(
                                                GetJobId(),
                                                a_minDBSize,
                                                a_maxDBSize,
                                                a_allocDBSize,
                                                m_iJobParams.jobType);
                m_dbSize = a_allocDBSize;

            }

            m_dbAllocated = true;
            m_dbReleased = false;
            log_DBG_m(dbg_LOW, "Allocated: " << m_iJobParams.diskBufferFS);
        ); //ipc_EXEC_m
    } catch (ivd_Exception){
        log_DBG_m(dbg_NORM, "[" << m_iJobParams.jobID <<
            "] " << "RM->ReserveDiskBuffer failed.");

        m_status = i_RESOURCE_ERROR;
        throw;
    }
}//RequestDiskBuffer

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::ResetResMedOpComplete ( UInt32_t  a_resNum  ) 

Definition at line 749 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

Referenced by i_MaintFriJob_i::MediumOperationComplete().

                                                    {
    log_FUNC_A_m(ResetResMedOpComplete, "[" << m_iJobParams.jobID << "] a_resNum:"
        << a_resNum);
    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    m_resources[a_resNum].resMedOpComplete = false;
}

Here is the caller graph for this function:

UInt64_t i_Job_i::RoundUp2BlockSize ( UInt64_t  a_size,
UInt32_t  a_blockSize 
)

Definition at line 1142 of file i_job_impl.cpp.

References dbg_DETAIL, log_DBG_m, and log_FUNC_m.

Referenced by AllocateDiskBuffer().

                                                          {
    log_FUNC_m(RoundUp2BlockSize);


    log_DBG_m(dbg_DETAIL,"Size to roundup: " << a_size <<
                         "Block size: " << a_blockSize);


    UInt64_t remainder(a_size % a_blockSize);
    if (remainder != 0) {
        a_size += a_blockSize - remainder;
        log_DBG_m(dbg_DETAIL,"Rounded to: " << a_size);
        return a_size;
    }
    else {
        log_DBG_m(dbg_DETAIL,"Allready rounded to: " << a_size);
        return a_size;
    }

}

Here is the caller graph for this function:

void i_Job_i::SetBeaStatus ( UInt32_t  a_beaNum,
ivd_BeaStatus_e  a_status 
)

Definition at line 1245 of file i_job_impl.cpp.

References dbg_DETAIL, GetJobId(), ie_FATAL_ERROR, ivd_BeaStatusToText(), log_DBG_m, log_FUNC_m, and m_beasStatus.

Referenced by i_MediumDupl_i::CheckTargetMedium(), i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_ReorgJob_i::InitializeSingleVolume(), i_ReorgJob_i::MediumOperationComplete(), i_RedundantCopyJob_i::MediumOperationComplete(), i_RecallJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_MaintFriJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_RecallJob_i::Process(), i_MigrationJob_i::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RedundantCopyJob_i::ReadSourceData(), i_ReorgJob_i::ReadSourceVolume(), i_RecallJob_i::RecallRetry(), i_MaintFriJob_i::RecreateFRI(), and ~i_Job_i().

                                                                      {
    log_FUNC_m(SetBeaStatus);

    if (a_beaNum >= m_beasStatus.size()) {
        throw ivd_InternalError(ie_FATAL_ERROR,
                                "Job wants to set status for non existing BEA.");
    }

    log_DBG_m(dbg_DETAIL, "Job: " << GetJobId());
    log_DBG_m(dbg_DETAIL, "Changing status for BEA: " << a_beaNum);
    log_DBG_m(dbg_DETAIL, "Previous status: "
                          << ivd_BeaStatusToText(m_beasStatus[a_beaNum]));

    m_beasStatus[a_beaNum] = a_status;

    log_DBG_m(dbg_DETAIL, "New status: "
                          << ivd_BeaStatusToText(m_beasStatus[a_beaNum]));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::SetCompletionStatus ( i_CompletionStatus_e  a_completionStatus  ) 

Definition at line 1079 of file i_job_impl.cpp.

References m_status.

Referenced by i_BackupJob_i::i_BackupJob_i().

                                                                        {
    m_status = a_completionStatus;
}

Here is the caller graph for this function:

void i_Job_i::SetDiskBufferWritten (  ) 
void i_Job_i::SetDriveProperties ( UInt32_t  a_copyNum  ) 

Definition at line 839 of file i_job_impl.cpp.

References i_Resource_t::driveCtrlDevice, i_Resource_t::driveHost, i_Resource_t::driveKey, g_cmn, ipc_EXEC_m, log_FUNC_m, cmn_SysInfo::m_hostName, m_resource_x, m_resources, m_rm, i_Resource_t::mediumFamily, mf_DISK, and cmn_Global::si.

Referenced by ActivateBea(), i_AdminJob_i::Execute(), and i_BackupJob_i::PrepareResource().

                                                  {
    log_FUNC_m(SetDriveProperties);

    cmn_MutexLock l(m_resource_x);
    i_Resource_t &tmpRes = m_resources[a_copyNum];
    if (tmpRes.mediumFamily == mf_DISK){
        tmpRes.driveHost = CORBA::string_dup(g_cmn.si.m_hostName.c_str());
    } else {
        i_DriveHost_t_var dh;
        ipc_EXEC_m(
            dh = m_rm->GetHost(tmpRes.driveKey);
        );
        tmpRes.driveCtrlDevice = dh->controlDevice;
        tmpRes.driveHost = dh->host;
    }
}

Here is the caller graph for this function:

void i_Job_i::SetJobValid (  ) 

Definition at line 1068 of file i_job_impl.cpp.

References log_FUNC_m, and m_jobValid.

Referenced by InitJob(), and i_AdminJob_i::InitJob().

Here is the caller graph for this function:

void i_Job_i::SetPriority ( CORBA::Long  a_modifier  ) 
void i_Job_i::SetResAllocatedd ( UInt32_t  a_resNum  ) 

Definition at line 683 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

                                               {
    log_FUNC_A_m(SetResAllocated, "[" << m_iJobParams.jobID << "] a_resNum:"
        << a_resNum);
    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    m_resources[a_resNum].resAllocated = true;
}

void i_Job_i::SetResAssigned ( UInt32_t  a_resNum  ) 

Definition at line 694 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

                                             {
    log_FUNC_A_m(SetResAssigned, "[" << m_iJobParams.jobID << "] a_resNum:"
        << a_resNum);
    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    m_resources[a_resNum].resAssigned = true;
}

void i_Job_i::SetResBeaStarted ( UInt32_t  a_resNum  ) 

Definition at line 716 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

Referenced by ActivateBea(), i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_ReorgJob_i::InitializeSingleVolume(), and i_RedundantCopyJob_i::MigrateFiles().

                                               {
    log_FUNC_A_m(SetResBeaStarted, "[" << m_iJobParams.jobID << "] a_resNum:"
        << a_resNum);
    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    m_resources[a_resNum].resBeaStarted = true;
}

Here is the caller graph for this function:

void i_Job_i::SetResLoaded ( UInt32_t  a_resNum  ) 

Definition at line 800 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

Referenced by LoadUnload().

                                           {
    log_FUNC_A_m(SetResLoaded, "[" << m_iJobParams.jobID << "] a_resNum:"
        << a_resNum);
    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    m_resources[a_resNum].load = false;
}

Here is the caller graph for this function:

void i_Job_i::SetResMedOpComplete ( UInt32_t  a_resNum  ) 
void i_Job_i::SetResourceBusyStatus ( i_Index_t  a_resNum,
i_ResourceBusy_e  a_resStatus 
)

Reimplemented in i_AdminJob_i, i_MediumDupl_i, i_RedundantCopyJob_i, and i_ReorgJob_i.

Definition at line 211 of file i_job_impl.cpp.

References log_FUNC_m, m_resource_x, and m_resources.

                                                                 {
    log_FUNC_m(SetResourceBusyStatus);

    try {
        cmn_MutexLock l(m_resource_x);
        m_resources[a_resNum].resourceBusyStatus = a_resStatus;
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

void i_Job_i::SetResources ( i_Resource_t  a_resource  ) 

Definition at line 811 of file i_job_impl.cpp.

References ie_FATAL_ERROR, m_resource_x, m_resources, and i_Resource_t::resNum.

                                                 {
    //log_FUNC_m(SetResources);
    cmn_MutexLock l(m_resource_x);
    /*log_DBG_m(dbg_DETAIL,"" << endl << "Want to set resource:"  << endl <<
        ipc_Log::LogResources(a_resource));*/

    if ( static_cast<unsigned int>(a_resource.resNum)  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
                                "Accessing list member that does not exist");
    }
    m_resources[a_resource.resNum] = a_resource;
    /*log_DBG_m(dbg_DETAIL,"[" << m_iJobParams.jobID << "] " << "Resource set to:"
                                << endl << ipc_Log::LogResources(m_resources));*/
}

void i_Job_i::SetResources ( i_ResourceList_t  a_resource  ) 

Definition at line 664 of file i_job_impl.cpp.

References m_resource_x, and m_resources.

Referenced by i_MediumDupl_i::CompleteJob(), i_VvCopyJob_i::Execute(), i_BackupJob_i::i_BackupJob_i(), i_EfficientRecallJob_i::i_EfficientRecallJob_i(), i_MediumDupl_i::i_MediumDupl_i(), i_MigrationJob_i::i_MigrationJob_i(), i_RecallJob_i::i_RecallJob_i(), i_RedundantCopyJob_i::i_RedundantCopyJob_i(), i_ReorgJob_i::i_ReorgJob_i(), i_ReorgJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), i_AdminJob_i::InitJob(), i_RecallJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_MaintFriJob_i::PrepareMedium(), i_RecallJob_i::PrepareResource(), i_EfficientRecallJob_i::PrepareResource(), i_BackupJob_i::PrepareResource(), i_RecallJob_i::Process(), i_MediumDupl_i::Process(), i_EfficientRecallJob_i::Process(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), i_RecallJob_i::RecallRetry(), i_ReorgJob_i::SetResourceBusyStatus(), i_RedundantCopyJob_i::SetResourceBusyStatus(), i_MediumDupl_i::SetResourceBusyStatus(), and i_AdminJob_i::SetResourceBusyStatus().

                                                     {
//    log_FUNC_m(SetResources);
    cmn_MutexLock l(m_resource_x);
//    log_DBG_m(dbg_DETAIL,"" << endl << "Want to set resource:"  << endl << ipc_Log::LogResources(a_resource));
    m_resources = a_resource;
//    log_DBG_m(dbg_DETAIL,"" << endl << "Resource was set to:"  << endl << ipc_Log::LogResources(m_resources));
}

Here is the caller graph for this function:

void i_Job_i::SetResProcessed ( UInt32_t  a_resNum  ) 
void i_Job_i::SetResReleased ( UInt32_t  a_resNum  ) 

Definition at line 705 of file i_job_impl.cpp.

References ie_FATAL_ERROR, i_JobParams::jobID, log_FUNC_A_m, m_iJobParams, m_resource_x, and m_resources.

Referenced by ReleaseResource(), i_RecallJob_i::ReleaseResources(), i_MaintFriJob_i::ReleaseResources(), and i_EfficientRecallJob_i::ReleaseResources().

                                             {
    log_FUNC_A_m(SetResReleased, "[" << m_iJobParams.jobID << "] a_resNum:"
        << a_resNum);
    cmn_MutexLock l(m_resource_x);
    if ( a_resNum  >= m_resources.length() ) {
        throw ivd_InternalError(ie_FATAL_ERROR,
            "Accessing list member that does not exist");
    }
    m_resources[a_resNum].resReleased = true;
}

Here is the caller graph for this function:

void i_Job_i::SetResRequested ( UInt32_t  a_resNum  ) 
void i_Job_i::SetStatus ( i_JobStatus_e  a_status  ) 
void i_Job_i::Start (  ) 

Definition at line 328 of file i_job_impl.cpp.

References cmn_Num2Str(), ie_IMPOSSIBLE, job_STARTED, i_JobParams::jobID, log_FUNC_m, m_execTheadStarted, m_executor, m_iJobParams, m_jobParams_x, cmn_Thread::Start(), and i_JobParams::status.

Referenced by job_Manager::AddJobToList().

                    {
    log_FUNC_m(Start);

    cmn_MutexLock l(m_jobParams_x);

    if (m_iJobParams.status == job_STARTED) {
        throw ivd_InternalError(ie_IMPOSSIBLE,
            "Job was already started: " + cmn_Num2Str(m_iJobParams.jobID) );
    };

    m_iJobParams.status = job_STARTED;
    //m_executor->StartUndetached();
    m_executor->Start();
    m_execTheadStarted = true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::StartBea ( string  a_hostName,
UInt32_t  a_copyNum 
)

Definition at line 430 of file i_job_impl.cpp.

References cmn_Num2Str(), i_IVDBEA, ipc_EXEC_m, log_FUNC_m, m_resource_x, m_resources, ipc_Corba::ResolveSvc(), and ipc_Corba::Singleton().

Referenced by ActivateBea(), and i_AdminJob_i::StartBEA().

                                                           {
    log_FUNC_m(StartBea);

    ipc_EXEC_m (

        // We use _ptr here so that it does not get released by _var destructor
        // at the end of this block.
        // The reference is passed to BEA.
        CORBA::Object_ptr ref = i_Job::_duplicate(this->_this());
        CORBA::String_var ior(ipc_Corba::Singleton().m_orb->object_to_string(ref));

        //set arguments for calling BEA

        i_StringList_t args;
        args.length(2);
        args[0] = ior;

        i_Service_var iSvc;
        CORBA::Object_var objSVC = ipc_Corba::ResolveSvc(a_hostName);

        iSvc = i_Service::_narrow(objSVC);

        string copyNumStr = cmn_Num2Str( a_copyNum );
        args[1] = CORBA::string_dup( copyNumStr.c_str() );

        iSvc->Execute(i_IVDBEA, args);

        cmn_MutexLock l(m_resource_x);
        m_resources[a_copyNum].resBeaStarted = true;
    );
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool i_Job_i::Started (  ) 

Definition at line 354 of file i_job_impl.cpp.

References GetStatus(), and job_NOT_STARTED.

                      {
    return ( GetStatus() != job_NOT_STARTED);
}

Here is the call graph for this function:

void i_Job_i::WaitBea ( UInt32_t  a_copyNum  ) 

Definition at line 618 of file i_job_impl.cpp.

References dbg_DETAIL, dbg_NORM, cmn_Thread::GetTime(), ie_JOB_FAILED, ie_TIMEOUT, IsAborted(), ivd_Error, ivd_USleep, i_JobParams::jobID, log_DBG_m, log_ERR_m, log_FUNC_m, m_activeBeas, m_iJobParams, m_registerBea_c, m_registerBea_x, MAX_WAIT_FOR_BEA_TO_START, and cmn_Condition::TimedWait().

Referenced by ActivateBea(), and i_AdminJob_i::StartBEA().

                                       {
    log_FUNC_m(WaitBea);

    cmn_MutexLock l(m_registerBea_x);

    // Check first if BEA registered in mean-time.
    if ( CORBA::is_nil(m_activeBeas[a_copyNum]) ) {
        log_DBG_m(dbg_NORM, "[" << m_iJobParams.jobID << "] " <<
                            "Waiting for BEA to start beaNum " <<
                            a_copyNum);
        m_registerBea_c.TimedWait(cmn_Thread::GetTime(MAX_WAIT_FOR_BEA_TO_START));

        if (IsAborted()){
            return;
        }

        if ( CORBA::is_nil(m_activeBeas[a_copyNum]) ) {
            throw ivd_Error(ie_JOB_FAILED, "BEA error occured, job failed");
        }
    }

    UInt32_t sleep(1);
    while(true) {
        try {
            if(!m_activeBeas[a_copyNum]->_non_existent()) {
                log_DBG_m(dbg_DETAIL, "BEA ready");
                break;
            }
            if (sleep > 1000) {
                // Timeout elapsed. Will not continue.
                log_ERR_m("Timeout accessing BEA, most probably not available.");
                throw ivd_Error(ie_TIMEOUT, "BEA not responding, job failed");
            }
        }
        catch (ivd_Error) {
            throw;
        }
        catch (...) { // corba exceptions
            // empty
        }
        ivd_USleep(sleep);
        sleep *= 10;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_Job_i::WaitBeasToFinish ( UInt64_t  a_waitTimeOut  ) 

Definition at line 1164 of file i_job_impl.cpp.

References crashBeaInfo_t::beaNum, bs_PROCESSING, CleanupAfterBeaCrash(), cmn_Thread::Create(), dbg_DETAIL, dbg_NORM, GetBeaStatus(), GetJobId(), cmn_Thread::GetTime(), ipc_ObjectExists(), ivd_BeaStatusToText(), crashBeaInfo_t::jobPtr, log_DBG_m, log_FUNC_m, m_activate_c, m_activeBeas, m_beasStatus, cmn_Thread::PRIO_NORM, cmn_Condition::TimedWait(), and TIMEXPIRE_d.

Referenced by i_RecallJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_MaintFriJob_i::Execute(), i_EfficientRecallJob_i::Execute(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_ReorgJob_i::RecallFiles(), and i_RedundantCopyJob_i::RecallFiles().

                                                     {
    log_FUNC_m(WaitBeasToFinish);

    try {

    vector<UInt32_t> crashedBea;
    while (1) {
        vector<ivd_BeaStatus_e> activeBeasStatus(m_beasStatus);
        log_DBG_m(dbg_DETAIL,"Job:" << GetJobId()
                             << " waiting(a_waitTimeOut: "
                             << a_waitTimeOut << ")...");
        int status(m_activate_c.TimedWait(cmn_Thread::GetTime(a_waitTimeOut)));

        log_DBG_m(dbg_DETAIL,"TimedWait status: " << status);
        for (UInt32_t i(0); i < activeBeasStatus.size(); ++i) {
            bool beaRunning = ipc_ObjectExists(m_activeBeas[i]);
            log_DBG_m(dbg_DETAIL, "BEA " << i << " previous status: "
                                  << ivd_BeaStatusToText(activeBeasStatus[i]));
            log_DBG_m(dbg_DETAIL, "BEA " << i << " current status: "
                                  << ivd_BeaStatusToText(GetBeaStatus(i)));

            if (    (activeBeasStatus[i] == bs_PROCESSING)
                 && (GetBeaStatus(i) == bs_PROCESSING)
                 && (!beaRunning)) {

                    bool cleanupAlreadyDone(false);
                    if (!crashedBea.empty()) {
                        for (UInt32_t j(0); j < crashedBea.size(); ++j) {
                            if (crashedBea[j] == i) {
                                cleanupAlreadyDone = true;
                                break;
                            }
                        }
                    }

                    if (cleanupAlreadyDone) {
                        log_DBG_m(dbg_DETAIL, "MediumOperationComplete already started for BEA: "
                                              << i);
                    }
                    else {
                        crashedBea.push_back(i);
                        log_DBG_m(dbg_DETAIL, "Added BEA: " << i << " to crashed bea list");
                        //beaInfo will be deleted in CleanupAfterBeaCrash method.
                        crashBeaInfo_t *beaInfo = new crashBeaInfo_t;
                        log_DBG_m(dbg_DETAIL, "Set beaInfo.");
                        beaInfo->jobPtr = this;
                        log_DBG_m(dbg_DETAIL, "beaInfo->jobPtr: " << beaInfo->jobPtr);
                        beaInfo->beaNum = i;
                        log_DBG_m(dbg_DETAIL, "beaInfo->beaNum: " << beaInfo->beaNum);
                        cmn_Thread::Create(CleanupAfterBeaCrash,
                                           (void*)beaInfo,
                                           cmn_Thread::PRIO_NORM);
                        log_DBG_m(dbg_DETAIL, "MediumOperationComplete started for BEA: " << i);
                    }
            }
        } // for (UInt32_t i(0); i < activeBeasStatus.size(); ++i)

        if (status == TIMEXPIRE_d) {
            log_DBG_m(dbg_DETAIL,"Wait time expired.");
        }
        else {
            log_DBG_m(dbg_DETAIL,"Signaled to cotinue");
            break;
        }
    } // while (1)

    }
    catch (ivd_Error) {
        log_DBG_m(dbg_NORM, "Catch ivd_Error while waiting BEA to finish. Continuing...");
    }
    catch (ivd_Exception) {
        log_DBG_m(dbg_NORM, "Catch ivd_Exception while waiting BEA to finish. Continuing...");
    }
    catch (std::exception) {
        log_DBG_m(dbg_NORM, "Catch std::exception while waiting BEA to finish. Continuing...");
    }
    catch (...) {
        log_DBG_m(dbg_NORM, "Catch unknown exception while waiting BEA to finish. Continuing...");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class job_Executor [friend]

Definition at line 269 of file i_job_impl.h.

Referenced by i_Job_i().


Member Data Documentation

Definition at line 248 of file i_job_impl.h.

Referenced by AbortJob(), and IsAborted().

bool i_Job_i::m_aborted [protected]
vector<i_BackEndAgent_var> i_Job_i::m_activeBeas

Definition at line 272 of file i_job_impl.h.

Referenced by GetBeaStatus(), InitBeaStatus(), SetBeaStatus(), WaitBeasToFinish(), and ~i_Job_i().

Definition at line 262 of file i_job_impl.h.

Referenced by job_Executor::Run(), and job_Executor::~job_Executor().

bool i_Job_i::m_dbAllocated [protected]

Definition at line 254 of file i_job_impl.h.

Referenced by ReleaseDiskBuffer(), and RequestDiskBuffer().

Definition at line 257 of file i_job_impl.h.

Referenced by ReleaseDiskBuffer(), and RequestDiskBuffer().

bool i_Job_i::m_dbExist [protected]

Definition at line 255 of file i_job_impl.h.

Referenced by ReleaseDiskBuffer(), and SetDiskBufferWritten().

bool i_Job_i::m_dbReleased [protected]

Definition at line 256 of file i_job_impl.h.

Referenced by ReleaseDiskBuffer(), and RequestDiskBuffer().

Definition at line 258 of file i_job_impl.h.

Referenced by RequestDiskBuffer().

bool i_Job_i::m_execTheadStarted [protected]

Definition at line 263 of file i_job_impl.h.

Referenced by Start(), and ~i_Job_i().

Definition at line 238 of file i_job_impl.h.

Referenced by i_Job_i(), Start(), and ~i_Job_i().

bool i_Job_i::m_finished [protected]

Definition at line 251 of file i_job_impl.h.

Referenced by Finished(), IsFinished(), and Remove().

Definition at line 249 of file i_job_impl.h.

Referenced by Finished(), IsFinished(), and Remove().

i_Job_var i_Job_i::m_iJob [protected]

Definition at line 233 of file i_job_impl.h.

Referenced by AbortJob(), i_FSCCheckJob_i::AbortJob(), i_EfficientRecallJob_i::AbortRecallOnHsm(), ActivateBea(), i_MigrationJob_i::AssignResources(), i_MediumDupl_i::AssignResources(), AssignResources(), i_MaintFriJob_i::CheckReadFri(), i_MediumDupl_i::CheckTargetMedium(), ClearResStatus(), i_AdminJob_i::CloseVolume(), i_ThreadJob_i::CompleteJob(), i_ReorgJob_i::CompleteJob(), i_RecallJob_i::CompleteJob(), i_MigrationJob_i::CompleteJob(), i_MediumDupl_i::CompleteJob(), i_MediumCheckJob_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_EfficientRecallJob_i::CompleteJob(), i_AdminJob_i::DeleteMedVolFromRMDB(), i_AdminJob_i::DetectVolumeHeader(), i_ReorgJob_i::DiskBufferCleanup(), i_AdminJob_i::DoInitialize(), i_VvCopyJob_i::Execute(), i_ReorgScanJob_i::Execute(), i_ReorgJob_i::Execute(), i_RedundantCopyJob_i::Execute(), i_RecallJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_MaintFriJob_i::Execute(), i_EfficientRecallJob_i::Execute(), i_BackupJob_i::Execute(), i_AdminJob_i::Execute(), i_AdminJob_i::Format(), GetDiskBufferFileName(), GetJobId(), GetJobParams(), GetJobStatus(), GetJobTypeEnum(), i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_BackupJob_i::GetNewResources(), i_RecallJob_i::GetNextRecallSet(), i_EfficientRecallJob_i::GetNextRecallSet(), GetStatus(), i_AdminJob_i::i_AdminJob_i(), i_BackupJob_i::i_BackupJob_i(), i_EfficientRecallJob_i::i_EfficientRecallJob_i(), i_Job_i(), i_MaintFriJob_i::i_MaintFriJob_i(), i_MediumCheckJob_i::i_MediumCheckJob_i(), i_MediumDupl_i::i_MediumDupl_i(), i_MigrationJob_i::i_MigrationJob_i(), i_RecallJob_i::i_RecallJob_i(), i_RecoveryJob_i::i_RecoveryJob_i(), i_RedundantCopyJob_i::i_RedundantCopyJob_i(), i_ReorgJob_i::i_ReorgJob_i(), i_ThreadJob_i::i_ThreadJob_i(), i_AdminJob_i::Initialize(), i_ReorgJob_i::InitializeSingleVolume(), i_AdminJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), i_AdminJob_i::InitJob(), IsAborted(), IsResMedOpComplete(), LoadUnload(), i_ThreadJob_i::MediumOperationComplete(), i_ReorgJob_i::MediumOperationComplete(), i_RedundantCopyJob_i::MediumOperationComplete(), i_RecallJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_MaintFriJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), NeedsProcess(), i_AdminJob_i::OperateLA(), i_MediumDupl_i::PreFormat(), i_RedundantCopyJob_i::Prepare(), i_MaintFriJob_i::PrepareMedium(), i_EfficientRecallJob_i::PrepareRecallListSeq(), i_RecallJob_i::PrepareResource(), i_EfficientRecallJob_i::PrepareResource(), i_RecallJob_i::Process(), i_MediumDupl_i::Process(), i_MaintFriJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RecoveryJob_i::ProcessFRI(), i_MediumCheckJob_i::ProcessFRI(), i_RedundantCopyJob_i::ReadSourceData(), i_ReorgJob_i::ReadSourceVolume(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), i_RecallJob_i::RecallRetry(), i_AdminJob_i::RecreateFRIandMIC(), ReleaseDiskBuffer(), ReleaseResource(), i_RecallJob_i::ReleaseResources(), i_MaintFriJob_i::ReleaseResources(), i_EfficientRecallJob_i::ReleaseResources(), Remove(), i_BackupJob_i::Remove(), i_ReorgJob_i::ReorgStatusCleanup(), RequestDiskBuffer(), i_MaintFriJob_i::RequestResources(), ResetResMedOpComplete(), job_Executor::Run(), pm_RecallClientThread::Run(), pm_AssignResThread::Run(), SetPriority(), SetResAllocatedd(), SetResAssigned(), SetResBeaStarted(), SetResLoaded(), SetResMedOpComplete(), SetResProcessed(), SetResReleased(), SetResRequested(), SetStatus(), i_AdminJob_i::SetSysVolIdx(), Start(), i_AdminJob_i::StartBEA(), WaitBea(), i_AdminJob_i::~i_AdminJob_i(), ~i_Job_i(), i_MaintFriJob_i::~i_MaintFriJob_i(), i_MediumDupl_i::~i_MediumDupl_i(), i_MigrationJob_i::~i_MigrationJob_i(), i_RedundantCopyJob_i::~i_RedundantCopyJob_i(), and i_ThreadJob_i::~i_ThreadJob_i().

Definition at line 232 of file i_job_impl.h.

Referenced by Remove().

Definition at line 240 of file i_job_impl.h.

Referenced by GetStatus(), i_Job_i(), SetPriority(), SetStatus(), and Start().

bool i_Job_i::m_jobValid [protected]

Reimplemented in i_AdminJob_i.

Definition at line 231 of file i_job_impl.h.

Referenced by CheckJobValid(), and SetJobValid().

Definition at line 246 of file i_job_impl.h.

Referenced by RegisterBEA(), and WaitBea().

Definition at line 245 of file i_job_impl.h.

Referenced by RegisterBEA(), and WaitBea().

i_ResourceManager_var i_Job_i::m_rm [protected]

Definition at line 235 of file i_job_impl.h.

Referenced by AbortJob(), i_BackupJob_i::AllocateDiskBuffer(), i_AdminJob_i::CheckMedium(), i_AdminJob_i::CheckPartition(), i_AdminJob_i::CheckPool(), i_MediumDupl_i::CheckTargetMedium(), i_AdminJob_i::CheckVolumesForFriMicJob(), i_AdminJob_i::CloseVolume(), i_MigrationJob_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_AdminJob_i::DeleteMedVolFromRMDB(), i_AdminJob_i::DoInitialize(), i_VvCopyJob_i::Execute(), i_ReorgScanJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_AdminJob_i::Execute(), i_AdminJob_i::Format(), GetJobParams(), i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_BackupJob_i::GetNewResources(), i_BackupJob_i::i_BackupJob_i(), i_Job_i(), i_MediumDupl_i::i_MediumDupl_i(), i_RedundantCopyJob_i::i_RedundantCopyJob_i(), i_ReorgJob_i::i_ReorgJob_i(), i_AdminJob_i::Initialize(), i_ReorgJob_i::InitializeSingleVolume(), i_AdminJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), i_ReorgJob_i::MediumOperationComplete(), i_RecallJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_AdminJob_i::OperateLA(), i_MediumDupl_i::PreFormat(), i_RedundantCopyJob_i::Prepare(), i_MaintFriJob_i::PrepareMedium(), i_RecallJob_i::PrepareResource(), i_EfficientRecallJob_i::PrepareResource(), i_BackupJob_i::PrepareResource(), i_MaintFriJob_i::PrepareVolumes(), i_RecallJob_i::Process(), i_EfficientRecallJob_i::Process(), i_RecoveryJob_i::ProcessFRI(), i_ReorgJob_i::ReadSourceVolume(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), ReleaseDiskBuffer(), ReleaseResource(), i_RecallJob_i::ReleaseResources(), i_MaintFriJob_i::ReleaseResources(), i_EfficientRecallJob_i::ReleaseResources(), i_ReorgJob_i::ReorgStatusCleanup(), RequestDiskBuffer(), i_MaintFriJob_i::RequestResources(), SetDriveProperties(), i_RecoveryJob_i::SetRecoveryFlagOnVolumes(), i_AdminJob_i::SetVolumes(), i_ReorgJob_i::UpdateMediumStatus(), i_AdminJob_i::~i_AdminJob_i(), ~i_Job_i(), i_RedundantCopyJob_i::~i_RedundantCopyJob_i(), and i_ReorgJob_i::~i_ReorgJob_i().

Definition at line 226 of file i_job_impl.h.

Referenced by i_MediumDupl_i::CheckTargetMedium(), i_ThreadJob_i::CompleteJob(), i_ReorgJob_i::CompleteJob(), i_RedundantCopyJob_i::CompleteJob(), i_MigrationJob_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_VvCopyJob_i::Execute(), i_ReorgScanJob_i::Execute(), i_ReorgJob_i::Execute(), i_RedundantCopyJob_i::Execute(), i_RecreatedIVDFSJob_i::Execute(), i_RecallJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_MediumCheckJob_i::Execute(), i_MaintFriJob_i::Execute(), i_FSCCheckJob_i::Execute(), i_EfficientRecallJob_i::Execute(), i_DelExpiredFilesJob_i::Execute(), i_AdminJob_i::Execute(), i_BackupJob_i::GetNewResources(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_MaintFriJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_RedundantCopyJob_i::Prepare(), i_RecallJob_i::PrepareResource(), i_EfficientRecallJob_i::PrepareResource(), i_BackupJob_i::PrepareResource(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), ReleaseDiskBuffer(), Remove(), i_BackupJob_i::Remove(), RequestDiskBuffer(), i_MaintFriJob_i::RequestResources(), pm_FriProcessor::Run(), job_Executor::Run(), SetCompletionStatus(), i_RecoveryJob_i::~i_RecoveryJob_i(), i_RedundantCopyJob_i::~i_RedundantCopyJob_i(), i_ReorgScanJob_i::~i_ReorgScanJob_i(), job_Executor::~job_Executor(), and pm_FriProcessor::~pm_FriProcessor().

Definition at line 261 of file i_job_impl.h.

Referenced by job_Executor::job_Executor(), ~i_Job_i(), and job_Executor::~job_Executor().


The documentation for this class was generated from the following files: