Public Member Functions | Public Attributes | Protected Attributes | Friends

i_MaintFriJob_i Class Reference
[Partition Manager]

#include <i_maintfrijob_impl.h>

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

List of all members.

Public Member Functions

 i_MaintFriJob_i (i_PartitionManager_i &a_iPM, pm_JobMgr &a_jobMgr, i_MediumSeqByVol_t &a_medSeqByVol, i_UIMessageServer_ptr a_uims, const cmn_Path &a_uiMsgWriterFile="", bool a_secondTry=false, bool a_autoCorrect=false, bool removeMissingOnMedia=false)
virtual ~i_MaintFriJob_i ()
virtual void GetNewResources (i_Index_t a_resNum)
virtual void MediumOperationComplete (i_Index_t a_beaNum, i_CompletionStatus_e a_status)
virtual void CompleteJob (i_CompletionStatus_e a_status)
virtual i_JobRequestList_tGetFiles ()
void FRIReadSuccess (i_Index_t a_beaNum, i_Index_t a_volNum, i_BlkOffset_t a_lastDataPos)
i_FSC_ptr GetFSC ()
void GetFRI (UInt32_t a_medNum)
void RecreateFRI (UInt32_t a_medNum)
void Process (Int32_t a_medNum)
 Non-interface function.
virtual void ProcessFRI (pm_FRIInfo a_FRIInfo)=0
virtual void Execute ()=0
void PrepareMedium (i_MediumSeqByVol_t &a_medSeqByVol, bool a_autoCorrect, bool a_removeMissingOnMedia)
void PrepareVolumes (i_MediumVolSeq_t &a_medVolSeq, MediumInfo_t &a_medInfo)
void CheckReadFri (UInt32_t a_beaNum)
void RequestResources ()
void ReleaseResources (UInt32_t a_medNum)
bool AllBeaFinished ()
void AbortFriProcessor ()
void InsertToFriProcessor (pm_FRIInfo a_friInfo)
void EndOfFRIInput ()

Public Attributes

bool m_allFriSuccess
bool m_allFriRead
pm_FriProcessorm_friProcessor
cmn_Mutex m_friProcessor_x
ui_MsgWriter m_uiMsgWriter
 log_CLASSID_m

Protected Attributes

i_PartitionManager_im_iPM
vector< MediumInfo_tm_mediumInfoVec
cmn_ThreadCounter m_threadCnt

Friends

class pm_AssignResThread

Detailed Description

Definition at line 86 of file i_maintfrijob_impl.h.


Constructor & Destructor Documentation

i_MaintFriJob_i::i_MaintFriJob_i ( i_PartitionManager_i a_iPM,
pm_JobMgr a_jobMgr,
i_MediumSeqByVol_t a_medSeqByVol,
i_UIMessageServer_ptr  a_uims,
const cmn_Path a_uiMsgWriterFile = "",
bool  a_secondTry = false,
bool  a_autoCorrect = false,
bool  removeMissingOnMedia = false 
)

Definition at line 52 of file i_maintfrijob_impl.cpp.

References i_JobParams::bufType, i_JobParams::copies, rm_String::cvalue_p, dbg_DETAIL, dbg_NORM, ui_MsgWriter::DisplayMessage(), i_Job_i::GetResources(), i_Job_i::InitBeaStatus(), i_JobParams::jobID, i_JobParams::jobType, log_DBG_m, log_FUNC_m, ipc_Log::LogMediumVol(), i_Job_i::m_activeBeas, i_PartitionManager_i::m_config, m_friProcessor, i_Job_i::m_iJobParams, m_iPM, i_PartitionManager_i::m_rmPart, m_threadCnt, m_uiMsgWriter, cfg_PMCfg::name, rm_Partition::partitionUUIDString, i_JobParams::partName, i_JobParams::partUUID, PrepareMedium(), and cmn_Thread::Start().

    :   i_Job_i(a_jobMgr),
        m_allFriSuccess(true),
        m_iPM(a_iPM),
        m_allFriRead(false),
        m_uiMsgWriter(a_uiMsgWriterFile, a_uims)
{
    log_FUNC_m(i_MaintFriJob_i);

    //log all media and volumes
    log_DBG_m(dbg_DETAIL,"Media for FRI:" << a_medSeqByVol.length() );
    for (UInt32_t i = 0; i < a_medSeqByVol.length(); i++){
        for (UInt32_t j = 0; j < a_medSeqByVol[i].length(); j++){
            log_DBG_m(dbg_NORM,"Will recover volume:" << endl
                << ipc_Log::LogMediumVol(a_medSeqByVol[i][j]) << endl);
        }
    }


    m_iJobParams.jobType  = jt_MAINT;
    m_iJobParams.partName =
        CORBA::string_dup(m_iPM.m_config.name.c_str());

    m_iJobParams.partUUID =
        CORBA::string_dup(m_iPM.m_rmPart.partitionUUIDString.cvalue_p);

    m_iJobParams.bufType  = i_DISK_BUF;
    m_iJobParams.copies   = 0;


    ostringstream msg;
    msg << "Started (JobID: " << m_iJobParams.jobID << ").";
    m_uiMsgWriter.DisplayMessage(msg.str());

    PrepareMedium(a_medSeqByVol, a_autoCorrect, a_removeMissingOnMedia);

    UInt32_t numOfBeas((GetResources()).length());

    m_activeBeas.resize(numOfBeas);
    InitBeaStatus(numOfBeas);

    m_friProcessor = new pm_FriProcessor(this, m_threadCnt);
    m_friProcessor->Start();

}

Here is the call graph for this function:

i_MaintFriJob_i::~i_MaintFriJob_i (  )  [virtual]

Definition at line 107 of file i_maintfrijob_impl.cpp.

References dbg_LOW, ui_MsgWriter::DisplayError(), ui_MsgWriter::DisplayMessage(), i_Job_i::GetJobTypeText(), i_JobParams::jobID, log_DBG_m, log_ERR_m, log_FUNC_m, log_WriteEvent(), i_Job_i::m_iJobParams, m_mediumInfoVec, friVolStatus_t::m_processed, friVolStatus_t::m_read, friVolStatus_t::m_recreated, m_uiMsgWriter, friVolStatus_t::m_volInfo, i_VolInfo_t::medVolID, and i_VolInfo_t::volNum.

                                 {
    log_FUNC_m(~i_MaintFriJob_i);

    //summary which fri were processed.

    bool allProcessed(true);

    for (UInt32_t i(0); i < m_mediumInfoVec.size(); i++){
        log_DBG_m(dbg_LOW, "i:" << i <<
            " barcode:" << m_mediumInfoVec[i].m_medium.barcode);
        for (UInt32_t j(0); j < m_mediumInfoVec[i].m_friVolStatus.size(); j++){
            friVolStatus_t &fri = m_mediumInfoVec[i].m_friVolStatus[j];

            log_DBG_m(dbg_LOW, "FRI for volume " << fri.m_volInfo.medVolID <<
                " processed:" << fri.m_processed <<
                " read:"      << fri.m_read <<
                " recreated:" << fri.m_recreated);

            if (!fri.m_processed) {
                allProcessed = false;
                ostringstream errMsg;
                errMsg << "Processing of FRI file for Volume: "
                       << fri.m_volInfo.medVolID << " failed. " <<
                       " Barcode: " << m_mediumInfoVec[i].m_medium.barcode <<
                       " VolNr.: " << fri.m_volInfo.volNum <<
                       " See error log file for details."
                       << endl;
                m_uiMsgWriter.DisplayError(errMsg.str());
                log_WriteEvent(errMsg.str(), GetJobTypeText(), m_iJobParams.jobID);

                if (fri.m_read){
                    log_ERR_m(errMsg.str() << " Reading from medium succeeded.");
                } else {
                    log_ERR_m(errMsg.str() << " Reading from medium failed.");
                }
            }
        }
    }

    ostringstream msg;
    msg << "Finished (JobID: " << m_iJobParams.jobID << ").";
    m_uiMsgWriter.DisplayMessage(msg.str());
}

Here is the call graph for this function:


Member Function Documentation

void i_MaintFriJob_i::AbortFriProcessor (  ) 

Definition at line 991 of file i_maintfrijob_impl.cpp.

References pm_FriProcessor::Aborted(), dbg_LOW, log_DBG_m, log_FUNC_m, m_friProcessor, m_friProcessor_x, and NULL.

Referenced by CompleteJob().

Here is the call graph for this function:

Here is the caller graph for this function:

bool i_MaintFriJob_i::AllBeaFinished (  ) 

Definition at line 555 of file i_maintfrijob_impl.cpp.

References dbg_LOW, dbg_NORM, log_DBG_m, log_FUNC_m, m_allFriRead, and m_mediumInfoVec.

Referenced by MediumOperationComplete().

                                    {
    log_FUNC_m(AllBeaFinished());

    for (UInt32_t i(0); i < m_mediumInfoVec.size(); i++){
        if (!(m_mediumInfoVec[i].m_beaFinished ||
              m_mediumInfoVec[i].m_allFriRead) ) {
            log_DBG_m(dbg_NORM,"bea:" << i <<
                               " m_beaFinished:" << boolalpha <<
                               m_mediumInfoVec[i].m_beaFinished <<
                               ", m_allFriRead:" << boolalpha <<
                               m_mediumInfoVec[i].m_allFriRead);
            return false;
        }

    }
    log_DBG_m(dbg_LOW,"All bea finished");
    return true;
}

Here is the caller graph for this function:

void i_MaintFriJob_i::CheckReadFri ( UInt32_t  a_beaNum  ) 

Definition at line 355 of file i_maintfrijob_impl.cpp.

References i_Medium_t::barcode, dbg_LOW, dbg_NORM, cmn_Global::dirs, ui_MsgWriter::DisplayMessage(), cmn_File::Exists(), ivd_Directories::fri, g_cmn, i_Job_i::GetJobTypeText(), i_JobParams::jobID, log_DBG_m, log_FUNC_m, log_WriteEvent(), MediumInfo_t::m_allFriRead, MediumInfo_t::m_friVolStatus, i_Job_i::m_iJobParams, MediumInfo_t::m_medium, m_mediumInfoVec, friVolStatus_t::m_read, m_uiMsgWriter, friVolStatus_t::m_volInfo, i_VolInfo_t::medVolID, and ivd_Directories::tmp.

Referenced by MediumOperationComplete().

                                                   {
    log_FUNC_m(CheckReadFri);

    bool allFriRead(true);
    MediumInfo_t &medInfo = m_mediumInfoVec[a_medNum];

    log_DBG_m(dbg_LOW,  "Number of volumes on medium " << medInfo.m_medium.barcode
                      << " is " << medInfo.m_friVolStatus.size());
    //for each volume
    for (UInt32_t i(0); i < medInfo.m_friVolStatus.size(); i++) {

        friVolStatus_t & friVolStatus = medInfo.m_friVolStatus[i];
        log_DBG_m(dbg_LOW,  "Checking fri for mediumvol: " <<
                            friVolStatus.m_volInfo.medVolID
                            << ", friVolStatus.m_read = " << boolalpha << friVolStatus.m_read
                            << ", allFriRead = " << boolalpha << allFriRead
                            );

        if (friVolStatus.m_read)
            continue; //skip this volume it is already read

        string medVol( friVolStatus.m_volInfo.medVolID);

        //check on fri directory first
        cmn_Path friFilePath = g_cmn.dirs.fri + medVol;
        cmn_File friFile(friFilePath);

        if (friFile.Exists()){
            friVolStatus.m_read = true;
            log_DBG_m(dbg_NORM,"FRI for volume " <<
                friVolStatus.m_volInfo.medVolID << " read" );
        }
        else {
            log_DBG_m(dbg_LOW,  "FRI for that mediumvol: " << medVol <<
                " still not on disk.");
            friVolStatus.m_read = false;
            allFriRead = false;
        }

        if (friVolStatus.m_read == false) { //now check also tmp directory
            cmn_Path tmpfriFilePath = g_cmn.dirs.tmp + string("fri") + medVol;
            cmn_File tmpfriFile(tmpfriFilePath);

            if (tmpfriFile.Exists()){
                friVolStatus.m_read = true;
                log_DBG_m(dbg_NORM,"FRI for volume " <<
                                friVolStatus.m_volInfo.medVolID << " read" );
            }
            else {
                log_DBG_m(dbg_LOW,  "FRI for that mediumvol: " << medVol <<
                                    " still not on disk.");
                friVolStatus.m_read = false;
                allFriRead = false;
            }
        }
    }

    //update medium info
    medInfo.m_allFriRead = allFriRead;


    if (medInfo.m_allFriRead) {
        log_DBG_m(dbg_LOW,"All Fri written to disk");
    }
    else {
        for (UInt32_t i(0); i < medInfo.m_friVolStatus.size(); i++) {
            friVolStatus_t & friVolStatus = medInfo.m_friVolStatus[i];
            if ( !friVolStatus.m_read){
                ostringstream msg;
                msg << "Medium: " << medInfo.m_medium.barcode <<
                       ", FRI: " << friVolStatus.m_volInfo.medVolID <<
                       " could not be read. Recreating ... ";
                log_DBG_m(dbg_LOW, msg.str());

                m_uiMsgWriter.DisplayMessage(msg.str());
                log_WriteEvent(msg.str(), GetJobTypeText(), m_iJobParams.jobID);
            }

        }

    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::CompleteJob ( i_CompletionStatus_e  a_status  )  [virtual]

Implements i_Job_i.

Reimplemented in i_MediumCheckJob_i.

Definition at line 574 of file i_maintfrijob_impl.cpp.

References AbortFriProcessor(), dbg_DETAIL, dbg_LOW, ui_MsgWriter::DisplayError(), ui_MsgWriter::DisplayWarning(), evt_ERROR, evt_WARNING, i_Job_i::GetJobTypeText(), i_Job_i::GetResources(), i_BEA_ERROR, i_CLIENT_ERROR, i_CLIENT_NOFILES, i_DATA_ERROR, i_FAILED, i_HW_ERROR, i_LA_ERROR, i_NO_HOST, i_RESOURCE_ERROR, i_SUCCEDED, i_SVC_ERROR, ipc_EXEC_m, i_Job_i::IsAborted(), i_JobParams::jobID, log_DBG_m, log_ERR_m, log_FUNC_m, log_WriteEvent(), ipc_Log::LogResources(), i_Job_i::m_aborted, i_Job_i::m_iJobParams, i_Job_i::m_rm, i_Job_i::m_status, m_threadCnt, m_uiMsgWriter, ReleaseResources(), i_Job_i::Remove(), and cmn_ThreadCounter::WaitAllEnd().

Referenced by pm_FriProcessor::~pm_FriProcessor().

                                                               {
    log_FUNC_m(CompleteJob);

    //wait for pm_FRIProcessor to finish
    if ((IsAborted() || (m_status != i_SUCCEDED))){
        AbortFriProcessor();
    }

    log_DBG_m(dbg_LOW,"Waiting for thread to finish");
    m_threadCnt.WaitAllEnd();
    log_DBG_m(dbg_LOW,"thread finished");

    try {
        if (a_status == i_SUCCEDED) {
            log_WriteEvent("Finished.", GetJobTypeText(), m_iJobParams.jobID);
        }
        else if (m_aborted) {
            log_WriteEvent(evt_WARNING, "Aborted.",
                           GetJobTypeText(), m_iJobParams.jobID);
            m_uiMsgWriter.DisplayWarning("Aborted.");

        }
        else {
            ostringstream os;
            os << "Failed (" << a_status << ").";
            log_WriteEvent(evt_ERROR, os.str(),
                           GetJobTypeText(), m_iJobParams.jobID);
            m_uiMsgWriter.DisplayError(os.str());

            switch (a_status) {
                case(i_DATA_ERROR):
                case(i_HW_ERROR):
                //case(i_MEDIUM_ERROR):

                    break;

                case(i_CLIENT_ERROR): //if client failed just remove job
                case(i_CLIENT_NOFILES): //if client has no files for Recovery
                case(i_LA_ERROR):
                case(i_SVC_ERROR):
                case(i_NO_HOST):   //if LA, SVC or NOHOST ERROR Release resources

                case(i_BEA_ERROR):
                case(i_RESOURCE_ERROR):
                case(i_FAILED):
                default:
                    log_ERR_m( "Job failed.");
            }
        }
        i_ResourceList_t resources = GetResources();
        bool resCanceled(false);
        for (UInt32_t i = 0; i < resources.length(); ++i){
            if (resources[i].resAllocated && !resources[i].resReleased) {
                try {
                    log_DBG_m(dbg_DETAIL, "" << ipc_Log::LogResources(resources[i]));
                    ReleaseResources(i);
                }
                catch (ivd_Exception& e){
                    log_ERR_m("Failed releasing resources." << endl << e);
                }
            }

            if (!resCanceled && resources[i].resRequested && !resources[i].resReleased) {
                resCanceled = true;
                try {
                    ipc_EXEC_m(
                        m_rm->CancelGetResource(m_iJobParams.jobID);
                    )
                }
                catch (ivd_Exception& e) {
                    log_DBG_m(dbg_LOW, e);
                }
            }
        }
        Remove();

    } catch (ivd_Exception& e) {
        log_ERR_m(e);
    } catch (ivd_InternalError& ie) {
        log_ERR_m(ie);
    } catch (...) {
        log_ERR_m("Caught unknown" );
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::EndOfFRIInput (  ) 

Definition at line 1013 of file i_maintfrijob_impl.cpp.

References pm_FriProcessor::Completed(), dbg_LOW, log_DBG_m, log_FUNC_m, m_friProcessor, m_friProcessor_x, and NULL.

Referenced by MediumOperationComplete(), and RequestResources().

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::Execute (  )  [pure virtual]

Implements i_Job_i.

Implemented in i_MediumCheckJob_i, and i_RecoveryJob_i.

Definition at line 935 of file i_maintfrijob_impl.cpp.

References dbg_DETAIL, dbg_NORM, i_Job_i::GetResources(), i_Job_i::IsAborted(), i_Job_i::IsFinished(), i_JobParams::jobID, log_DBG_m, log_ERR_m, log_FUNC_m, i_Job_i::m_activate_x, i_Job_i::m_iJobParams, i_Job_i::m_status, i_Job_i::NeedsProcess(), Process(), RequestResources(), i_Job_i::SetResProcessed(), and i_Job_i::WaitBeasToFinish().

                              {
    log_FUNC_m(Execute);

    try {
        RequestResources();
    } catch (ivd_Exception){
        log_DBG_m(dbg_NORM, "RM->GetResources failed. Complete job.");
        m_status = i_RESOURCE_ERROR;
        throw;
    }
    try {
        while ( !IsFinished() && !IsAborted() ) {
            for (UInt32_t i(0); i < GetResources().length(); i++){
                log_DBG_m(dbg_DETAIL,
                                "[" << m_iJobParams.jobID <<
                                "] " << "Processing copyNum:" << i <<
                                " resources assigned:" <<
                                GetResources()[i].resAssigned <<
                                " copy processed:" <<
                                GetResources()[i].resProcessed);

                if (IsAborted())
                    return;

                if ( NeedsProcess(i)) {
                    Process(i);
                    SetResProcessed(i);
                    i = 0; //restart processing since prev resource may got resources
                }
            }

            bool gotRes(false);

            for (UInt32_t i(0); i < GetResources().length(); i++){
                if ( NeedsProcess(i) ) {
                    gotRes = true;
                }
            }

            cmn_MutexLock l(m_activate_x);

            if (!gotRes){
                WaitBeasToFinish(5);
            }
        }

    } catch (ivd_Exception& e) {
        log_ERR_m( e );

        m_status = i_FAILED;
        throw;
    }
    m_status = i_SUCCEDED;

}

Here is the call graph for this function:

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

Reimplemented from i_Job_i.

Definition at line 676 of file i_maintfrijob_impl.cpp.

References i_Job_i::GetResources(), ie_FATAL_ERROR, InsertToFriProcessor(), i_Job_i::IsAborted(), ivd_Error, log_FUNC_A_m, and m_mediumInfoVec.

                                                                {
    log_FUNC_A_m(FRIReadSuccess, "a_beaNum=" << a_beaNum <<
                                 ", a_volNum=" << a_volNum <<
                                 ", a_lastDataPos" << a_lastDataPos);


    if (IsAborted()){
        return;
    }


    try {
        if (a_beaNum > static_cast<i_Index_t>(GetResources().length()) ) {
            throw ivd_InternalError(
                ie_FATAL_ERROR, "Non existing Bea sent FRIReadSuccess");
        };

        if (m_mediumInfoVec.size() <= static_cast<UInt32_t>(a_beaNum)){
            throw ivd_InternalError(ie_FATAL_ERROR, "Medium does not exist.");
        }

        bool found(false);
        for (UInt32_t i(0); i < m_mediumInfoVec[a_beaNum].m_friVolStatus.size(); i++){
            if (m_mediumInfoVec[a_beaNum].m_friVolStatus[i].m_volInfo.volNum == a_volNum ){
                found = true;
                m_mediumInfoVec[a_beaNum].m_friVolStatus[i].m_read = true;
            }
        }
        if (!found){
            throw ivd_Error(ie_FATAL_ERROR, "Medium Volume does not exist.");
        }


        pm_FRIInfo friInfo(a_beaNum, a_volNum, a_lastDataPos);
        InsertToFriProcessor(friInfo);

    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

i_JobRequestList_t * i_MaintFriJob_i::GetFiles ( void   )  [virtual]

Implements i_Job_i.

Definition at line 667 of file i_maintfrijob_impl.cpp.

References ie_IMPOSSIBLE, and log_FUNC_m.

                                             {
    log_FUNC_m(GetFiles);
    try {
        throw ivd_InternalError(ie_IMPOSSIBLE);
    } ipc_CATCH_IVD_THROW_CORBA_m;
    return NULL;
}

void i_MaintFriJob_i::GetFRI ( UInt32_t  a_medNum  ) 

Definition at line 756 of file i_maintfrijob_impl.cpp.

References cmn_CreatePath(), dbg_DETAIL, dbg_NORM, cmn_Global::dirs, g_cmn, i_SUCCEDED, ipc_EXEC_m, log_DBG_m, log_FUNC_m, i_Job_i::m_activeBeas, MediumInfo_t::m_friVolStatus, m_mediumInfoVec, friVolStatus_t::m_read, friVolStatus_t::m_volInfo, MediumOperationComplete(), and ivd_Directories::tmp.

Referenced by Process().

                                             {
    log_FUNC_m(GetFRI);

    cmn_Path tmpFriPath = g_cmn.dirs.tmp + string("fri");
    cmn_CreatePath(tmpFriPath);

    MediumInfo_t &medInfo = m_mediumInfoVec[a_medNum];

    i_VolInfoList_t volToRead;

    for (UInt32_t i(0); i < medInfo.m_friVolStatus.size(); i++){
        friVolStatus_t & friVolStatus = medInfo.m_friVolStatus[i];

        if (!friVolStatus.m_read) {
            //insert for Read;
            log_DBG_m(dbg_DETAIL,"Inserting to list for BEA");

            volToRead.length(volToRead.length() + 1);
            volToRead[volToRead.length()-1] = friVolStatus.m_volInfo;
        }
    }
    log_DBG_m(dbg_NORM,"List for recovery length:" << volToRead.length());
    if (volToRead.length() > 0) {
        ipc_EXEC_m(
            m_activeBeas[a_medNum]->ReadFastRecoveryInfo(
                                            volToRead,
                                            volToRead[0].sysVolNum );
        );
    } else {
        MediumOperationComplete(a_medNum, i_SUCCEDED);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

i_FSC_ptr i_MaintFriJob_i::GetFSC ( void   )  [virtual]

Implements i_Job_i.

Definition at line 845 of file i_maintfrijob_impl.cpp.

References ie_IMPOSSIBLE, and log_FUNC_m.

                                  {
    log_FUNC_m(GetFSC);
    try {
        throw ivd_InternalError(ie_IMPOSSIBLE);
    } ipc_CATCH_IVD_THROW_CORBA_m;
    return NULL;
}

void i_MaintFriJob_i::GetNewResources ( i_Index_t  a_resNum  )  [virtual]

Implements i_Job_i.

Definition at line 660 of file i_maintfrijob_impl.cpp.

References i_Job_i::GetResources(), ie_IMPOSSIBLE, and log_FUNC_A_m.

                                                       {
    log_FUNC_A_m(GetResources, "resNum=" << a_resNum);
    try {
        throw ivd_InternalError(ie_IMPOSSIBLE);
    } ipc_CATCH_IVD_THROW_CORBA_m;
}

Here is the call graph for this function:

void i_MaintFriJob_i::InsertToFriProcessor ( pm_FRIInfo  a_friInfo  ) 

Definition at line 1002 of file i_maintfrijob_impl.cpp.

References dbg_LOW, pm_FriProcessor::Insert(), log_DBG_m, log_FUNC_m, m_friProcessor, m_friProcessor_x, and NULL.

Referenced by FRIReadSuccess(), and RequestResources().

                                                              {
    log_FUNC_m(InsertToFriProcessor);

    cmn_MutexLock l(m_friProcessor_x);
    if (m_friProcessor == NULL){
        log_DBG_m(dbg_LOW, "FRI processor is NULL");
    } else {
        m_friProcessor->Insert(a_friInfo);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::MediumOperationComplete ( i_Index_t  a_beaNum,
i_CompletionStatus_e  a_status 
) [virtual]

Implements i_Job_i.

Definition at line 438 of file i_maintfrijob_impl.cpp.

References AllBeaFinished(), cmn_Condition::Broadcast(), bs_NOT_RUNNING, bs_RUNNING, CheckReadFri(), dbg_DETAIL, dbg_NORM, ui_MsgWriter::DisplayMessage(), EndOfFRIInput(), i_Job_i::GetJobTypeText(), i_Job_i::GetResources(), i_SUCCEDED, i_UNKNOWN, ie_FATAL_ERROR, ipc_EXEC_m, ipc_ObjectExists(), i_Job_i::IsAborted(), job_POST_MED_PROC, i_JobParams::jobID, log_DBG_m, log_FUNC_m, log_WriteEvent(), ipc_Log::LogResources(), ipc_Log::LogStatus(), i_Job_i::m_activate_c, i_Job_i::m_activate_x, i_Job_i::m_activeBeas, MediumInfo_t::m_allFriRead, m_allFriSuccess, MediumInfo_t::m_beaFinished, i_Job_i::m_beasStatus_x, i_Job_i::m_iJobParams, m_mediumInfoVec, MediumInfo_t::m_secondTry, i_Job_i::m_status, m_uiMsgWriter, RecreateFRI(), ReleaseResources(), i_Resource_t::resAllocated, i_Job_i::ResetResMedOpComplete(), i_Resource_t::resReleased, i_Job_i::SetBeaStatus(), i_Job_i::SetResMedOpComplete(), and i_Job_i::SetStatus().

Referenced by GetFRI(), and Process().

                                                                   {

        log_FUNC_m(MediumOperationComplete);

        log_DBG_m(dbg_NORM, "Recovery Completed by" <<
                    a_beaNum << "  status: [" << a_status << "]" <<
                    ipc_Log::LogStatus(a_status) << endl <<
                    m_iJobParams.jobID);

        if (IsAborted()){
            return;
        }

        try {
            if (a_beaNum > static_cast<i_Index_t>(GetResources().length()) ) {
                throw ivd_InternalError(
                    ie_FATAL_ERROR, "Non existing Bea wants to Complete Job??");
            };
        } ipc_CATCH_IVD_THROW_CORBA_m;

        SetResMedOpComplete(a_beaNum);
        {
            cmn_MutexLock l(m_beasStatus_x);
            SetBeaStatus(a_beaNum, bs_RUNNING);
        }

        if (a_status != i_SUCCEDED) {
            m_status = a_status;
            MediumInfo_t &medInfo = m_mediumInfoVec[a_beaNum];
            medInfo.m_beaFinished = true;
            m_allFriSuccess = false;

            i_Resource_t res = GetResources()[a_beaNum];
            if (res.resAllocated && !res.resReleased) {
                log_DBG_m(dbg_DETAIL, "" << ipc_Log::LogResources(res));
                ReleaseResources(a_beaNum);
                log_DBG_m(dbg_NORM, "Shutting down Bea...");

                // If error occured before BEA is started then m_activeBeas = null
                {
                    cmn_MutexLock l(m_beasStatus_x);
                    SetBeaStatus(a_beaNum, bs_NOT_RUNNING);
                }
                ipc_EXEC_m(
                    if (ipc_ObjectExists(m_activeBeas[a_beaNum])) {
                        m_activeBeas[a_beaNum]->Remove();
                    }
                    else {
                        log_DBG_m(dbg_NORM, "Bea not running. Skip m_activeBeas[a_beaNum]->Remove()");
                    }
                );
            }

            log_DBG_m(dbg_NORM, "Could not Get/Recreate all FRIs.");

            // Check if all beas finished
            if ( AllBeaFinished() ) {
                EndOfFRIInput();
                SetStatus(job_POST_MED_PROC);
            }
            else {
                log_DBG_m(dbg_DETAIL, "Locking m_activate_x ");
                cmn_MutexLock l(m_activate_x);
                m_activate_c.Broadcast();
            }
            return;
        }

        //Check which fri's were read
        CheckReadFri(a_beaNum);

        MediumInfo_t &medInfo = m_mediumInfoVec[a_beaNum];
        bool allFriRead = medInfo.m_allFriRead;

        if ( (allFriRead) || (medInfo.m_secondTry) ) {
            // if all FRI Read OR already tried recreate
            medInfo.m_beaFinished = true;
            i_Resource_t res = GetResources()[a_beaNum];
            if (res.resAllocated && !res.resReleased) {
                log_DBG_m(dbg_DETAIL, "" << ipc_Log::LogResources(res));
                ReleaseResources(a_beaNum);
                log_DBG_m(dbg_DETAIL,"Shutting down Bea");
                {
                    cmn_MutexLock l(m_beasStatus_x);
                    SetBeaStatus(a_beaNum, bs_NOT_RUNNING);
                    m_activeBeas[a_beaNum]->Remove();
                }
            }

            if (!allFriRead) {
                // log_EVT;
                ostringstream msg;
                msg << "Could not Get/Recreate all FRI's.";
                m_uiMsgWriter.DisplayMessage(msg.str());
                log_WriteEvent(msg.str(), GetJobTypeText(), m_iJobParams.jobID);
                m_allFriSuccess = false;
            }
        }
        else {
            //invoke bea->Recreate from mediumVolume
            medInfo.m_secondTry = true;
            ResetResMedOpComplete(a_beaNum);
            RecreateFRI(a_beaNum);
        }

        //Check if all beas finished
        if ( AllBeaFinished() ) {
            if (m_status == i_UNKNOWN){ //nobody set status to failed
                m_status = i_SUCCEDED;
            };
            EndOfFRIInput();
            SetStatus(job_POST_MED_PROC);
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::PrepareMedium ( i_MediumSeqByVol_t a_medSeqByVol,
bool  a_autoCorrect,
bool  a_removeMissingOnMedia 
)

Definition at line 151 of file i_maintfrijob_impl.cpp.

References i_Resource_t::barcode, i_Resource_t::blockSize, dbg_DETAIL, dbg_NORM, ui_MsgWriter::DisplayWarning(), evt_WARNING, i_Job_i::GetJobTypeText(), ie_SELECT_ERROR, ipc_EXEC_m, ivd_Error, i_JobParams::jobID, log_DBG_m, log_FUNC_m, log_WriteEvent(), ipc_Log::LogMedium(), ipc_Log::LogResources(), ipc_Log::LogVolInfo(), i_Job_i::m_iJobParams, m_mediumInfoVec, i_Job_i::m_rm, m_uiMsgWriter, i_Resource_t::mediumKey, PrepareVolumes(), i_Resource_t::resNum, ipc_Init::ResourceInit(), rmdb_MEDIUM_OFFLINE, rmdb_MEDIUM_UNRELIABLE, rmdb_MEDIUM_UNUSABLE, and i_Job_i::SetResources().

Referenced by i_MaintFriJob_i().

                                                                                     {
    log_FUNC_m(PrepareMedium);

    i_ResourceList_t resList;

    for (UInt32_t i(0); i < a_medSeqByVol.length(); i++) {

        i_MediumVolSeq_t &med  = a_medSeqByVol[i];
        i_Medium_t_var medium;

        if (med.length() == 0) {
            throw ivd_Error(ie_SELECT_ERROR, "Bad i_MediumSeqByVol_t. "
                                             "Medium with no volumes ");
        }
        ipc_EXEC_m(
            medium = m_rm->SelectMedium(med[0].mediumBarcode);
        )

        MediumInfo_t medInfo;
        medInfo.m_medium = medium;
        log_DBG_m (dbg_DETAIL, "" << ipc_Log::LogMedium(medInfo.m_medium));
        PrepareVolumes(med, medInfo);

        if (!medInfo.m_friVolStatus.empty()) {

            //log everything
            ostringstream msg;
            msg << ipc_Log::LogMedium(medInfo.m_medium) << endl;
            for (UInt32_t i(0); i < medInfo.m_friVolStatus.size(); i++){
                msg << "Volume: " << i << endl;
                msg << ipc_Log::LogVolInfo(medInfo.m_friVolStatus[i].m_volInfo)
                    << endl;
            }
            log_DBG_m(dbg_NORM, msg.str());

            //check if all volumes on medium are open (no need to start BEA)
            bool allRead(true);
            bool medUnusable(false);
            for (UInt32_t i(0); i < medInfo.m_friVolStatus.size(); i++) {
                if (!medInfo.m_friVolStatus[i].m_read) {
                    log_DBG_m(dbg_DETAIL,"Volume " << i << " not read.");
                    allRead = false;
                    //There are FRI that need to be read from medium
                    if ((medium->status & rmdb_MEDIUM_UNUSABLE) ||
                        (medium->status & rmdb_MEDIUM_OFFLINE) ||
                        ((medium->status & rmdb_MEDIUM_UNRELIABLE) && a_autoCorrect && !a_removeMissingOnMedia)) {
                        medUnusable = true;
                        ostringstream msg;
                        msg << "[" << m_iJobParams.jobID << "] Medium " <<
                            medium->barcode <<
                            " is marked unusable or unreliable and has closed volumes. " <<
                            "Job will not read FRI for this " <<
                            "volumes from this medium!";

                        m_uiMsgWriter.DisplayWarning(msg.str());
                        log_WriteEvent(evt_WARNING, msg.str(), GetJobTypeText(), m_iJobParams.jobID);
                    }
                    break;
                }
            }

            if (!medUnusable) {
                i_Resource_t allocRow;
                ipc_Init::ResourceInit(allocRow);

                allocRow.resNum    = 0;
                allocRow.blockSize = medInfo.m_friVolStatus[0].m_volInfo.blockSize;
                medInfo.m_medium   = medium;

                if (allRead) {
                    log_DBG_m(dbg_DETAIL,"All volumes Read");
                    medInfo.m_allFriRead = true;
                }


                allocRow.barcode        = medium->barcode;
                allocRow.mediumKey      = medium->mediumKey;

                resList.length(resList.length() + 1);
                allocRow.resNum = resList.length() - 1;
                resList[resList.length() - 1] = allocRow;

                m_mediumInfoVec.push_back(medInfo);
            }
        }
    } //for

    log_DBG_m(dbg_DETAIL," resList.length()" <<  resList.length() );
    for (UInt32_t i(0); i < resList.length(); i++){
        log_DBG_m(dbg_DETAIL," " << ipc_Log::LogResources(resList[i]));
    }
    SetResources(resList);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::PrepareVolumes ( i_MediumVolSeq_t a_medVolSeq,
MediumInfo_t a_medInfo 
)

Definition at line 247 of file i_maintfrijob_impl.cpp.

References i_Medium_t::blockSize, i_VolInfo_t::blockSize, dbg_DETAIL, dbg_LOW, dbg_NORM, cmn_Global::dirs, cmn_File::Exists(), ivd_Directories::fri, g_cmn, i_VolInfo_t::implID, ipc_Init::InitVolInfo(), ipc_EXEC_m, ipc_nilStr, log_DBG_m, log_FUNC_m, ipc_Log::LogMediumVol(), ipc_Log::LogVolInfo(), MediumInfo_t::m_friVolStatus, MediumInfo_t::m_medium, friVolStatus_t::m_open, friVolStatus_t::m_read, i_Job_i::m_rm, friVolStatus_t::m_volInfo, i_Medium_t::mediaPoolName, i_VolInfo_t::medVolID, i_VolInfo_t::partID, i_VolInfo_t::poolID, rmdb_MEDVOL_FULL, rmdb_SYSTEM_VOLUME, i_MediumVol_t::status, i_VolInfo_t::sysVolNum, i_VolInfo_t::type, i_MediumVol_t::volType, and i_MediumVol_t::volUsed.

Referenced by PrepareMedium().

                                                              {


    log_FUNC_m(PrepareVolumes);

    //search for sysVol
    bool foundSysVol(false);

    UInt32_t indexSysVol(0);
    for( ; indexSysVol < a_medVolSeq.length(); indexSysVol++){

        if (a_medVolSeq[indexSysVol].volType == rmdb_SYSTEM_VOLUME) {
            log_DBG_m(dbg_NORM, "Found system volume: " <<
                                a_medVolSeq[indexSysVol].medVolId);
            foundSysVol = true;
            break;
        }
    }
    if (!foundSysVol) indexSysVol = 0;

    for (UInt32_t j(0); j < a_medVolSeq.length(); j++){ //for each volume

        i_MediumVol_t &mediumVol = a_medVolSeq[j];

        if ( (mediumVol.volUsed > 0) &&
             (mediumVol.volType == rmdb_DATA_VOLUME ) ) {
            //consider open volumes AND data volumes
            friVolStatus_t tmpFRIVolStatus;

            log_DBG_m(dbg_DETAIL,"" << ipc_Log::LogMediumVol(mediumVol));

            i_VolInfo_t &volInfo = tmpFRIVolStatus.m_volInfo;

            ipc_Init::InitVolInfo(volInfo, mediumVol);

            volInfo.type         = i_VOL_IVD;
            volInfo.implID       = ipc_nilStr;
            if (foundSysVol) {
                volInfo.sysVolNum    = indexSysVol + 1;
            }
            else {
                volInfo.sysVolNum = 0;
            }

            log_DBG_m(dbg_DETAIL,   "System volume index on Medium :" <<
                                    indexSysVol);

            ipc_EXEC_m (

                i_MediaPool_t_var pool;

                pool = m_rm->SelectMediaPool(a_medInfo.m_medium.mediaPoolName);

                volInfo.partID      =
                    CORBA::string_dup(pool->partitionUUIDString);
                // stringified UUID

                volInfo.poolID      =
                    CORBA::string_dup(pool->poolUUIDString);
                // stringified UUID

                volInfo.blockSize   =
                    a_medInfo.m_medium.blockSize;
            );

            a_medInfo.m_friVolStatus.push_back(tmpFRIVolStatus);

            friVolStatus_t & friVolStatus =
                a_medInfo.m_friVolStatus[a_medInfo.m_friVolStatus.size() - 1];

            log_DBG_m(dbg_DETAIL,"push_back(friVolStatus);" <<
                &a_medInfo.m_friVolStatus[a_medInfo.m_friVolStatus.size() - 1]  << endl <<
                ipc_Log::LogVolInfo(friVolStatus.m_volInfo));

            //check if volume is closed and
            //insert it into list of closed volumes

            if ( (mediumVol.status & rmdb_MEDVOL_FULL) == 0){
                //volume is NOT Full
                log_DBG_m(dbg_DETAIL,"Volume not full");
                friVolStatus.m_open = true;
            }

            // verify if FRI file exist
            try {
                log_DBG_m(dbg_DETAIL,"Read FRI from Disk");

                string medVol( friVolStatus.m_volInfo.medVolID);
                cmn_Path friFilePath(g_cmn.dirs.fri + medVol);
                cmn_File friFile(friFilePath);

                if (!friFile.Exists()){
                    log_DBG_m(dbg_LOW, "FRI for that media volume is not on disk.");
                    //it will be read from medium
                    continue;
                }
                else {
                    friVolStatus.m_read = true;
                }
            }
            catch (ivd_Exception& e){
                log_DBG_m(dbg_DETAIL, " " << e);
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::Process ( Int32_t  a_medNum  ) 

Non-interface function.

Definition at line 721 of file i_maintfrijob_impl.cpp.

References i_Job_i::ActivateBea(), bs_PROCESSING, bs_RUNNING, ui_MsgWriter::DisplayMessage(), evt_ERROR, GetFRI(), ivd_BaseException::GetFriendly(), i_Job_i::GetJobTypeText(), i_Job_i::GetResources(), i_FAILED, i_Job_i::IsAborted(), i_JobParams::jobID, i_Job_i::LoadUnload(), log_ERR_m, log_FUNC_m, log_WriteEvent(), i_Job_i::m_beasStatus_x, i_Job_i::m_iJobParams, m_uiMsgWriter, MediumOperationComplete(), and i_Job_i::SetBeaStatus().

Referenced by Execute().

                                             {
    log_FUNC_m(Process);

    if (IsAborted())
        return;
    try {
        LoadUnload(a_medNum);
        cmn_MutexLock l(m_beasStatus_x);
        ActivateBea(a_medNum);
        SetBeaStatus(a_medNum, bs_RUNNING);

        ostringstream msg;
        msg << "Reading FRI from medium: " <<
            GetResources()[a_medNum].barcode << ".";
        m_uiMsgWriter.DisplayMessage(msg.str());

        if (IsAborted())
            return;
        GetFRI(a_medNum);
        SetBeaStatus(a_medNum, bs_PROCESSING);

    } catch (ivd_Exception& e){

        log_ERR_m(  "[" << m_iJobParams.jobID << "] " <<
                    "Caught Exception when calling BEA: " << e);
        ostringstream os;
        os << "Failed, BEA error (" << e.GetFriendly() << ").";
        log_WriteEvent(evt_ERROR, os.str(),
                       GetJobTypeText(), m_iJobParams.jobID);
        m_uiMsgWriter.DisplayMessage(os.str());

        MediumOperationComplete(a_medNum, i_FAILED);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void i_MaintFriJob_i::ProcessFRI ( pm_FRIInfo  a_FRIInfo  )  [pure virtual]

Implemented in i_MediumCheckJob_i, and i_RecoveryJob_i.

Referenced by pm_FriProcessor::Run().

Here is the caller graph for this function:

void i_MaintFriJob_i::RecreateFRI ( UInt32_t  a_medNum  ) 

Definition at line 789 of file i_maintfrijob_impl.cpp.

References bs_PROCESSING, dbg_DETAIL, dbg_LOW, dbg_NORM, i_SV_NOTHING, ipc_EXEC_m, ipc_nilStr, i_Job_i::IsAborted(), log_DBG_m, log_FUNC_m, i_Job_i::m_activeBeas, i_Job_i::m_beasStatus_x, MediumInfo_t::m_friVolStatus, m_mediumInfoVec, friVolStatus_t::m_open, friVolStatus_t::m_read, friVolStatus_t::m_recreated, friVolStatus_t::m_volInfo, i_VolInfo_t::medVolID, and i_Job_i::SetBeaStatus().

Referenced by MediumOperationComplete().

                                                  {
    log_FUNC_m(RecreateFRI);

    if (IsAborted())
        return;
    //Generate FRI from MedVol
    MediumInfo_t &medInfo = m_mediumInfoVec[a_medNum];

    i_VolInfoList_t volList;
    i_BoolList_t openVolList;

    for (UInt32_t i(0); i < medInfo.m_friVolStatus.size(); i++){

        friVolStatus_t & friVolStatus = medInfo.m_friVolStatus[i];
        try {
            log_DBG_m(dbg_LOW,"Generate FRI from MedVol");

            if (!friVolStatus.m_read){
                log_DBG_m(dbg_DETAIL,"i=" << i);
                log_DBG_m(dbg_NORM,   "Adding Volume for recreation :" <<
                                      friVolStatus.m_volInfo.medVolID <<
                                      " open: " << friVolStatus.m_open);

                volList.length(volList.length() + 1);
                volList[volList.length() - 1] = friVolStatus.m_volInfo;

                openVolList.length(openVolList.length() + 1);
                openVolList[openVolList.length() - 1] = friVolStatus.m_open;

                friVolStatus.m_recreated = true;
            }
        }
        catch (ivd_Exception& e){
            log_DBG_m(dbg_DETAIL, " " << e);
        }

    }
    log_DBG_m(dbg_LOW,"Calling Bea for fri recreation");

    {
        cmn_MutexLock l(m_beasStatus_x);
        ipc_EXEC_m(
            m_activeBeas[a_medNum]->RecreateFastRecoveryInfo(volList,
                                                             true,
                                                             openVolList,
                                                             i_SV_NOTHING,
                                                             false,
                                                             ipc_nilStr);
        );
        SetBeaStatus(a_medNum, bs_PROCESSING);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void i_MaintFriJob_i::ReleaseResources ( UInt32_t  a_medNum  ) 

Definition at line 910 of file i_maintfrijob_impl.cpp.

References dbg_DETAIL, dbg_LOW, dbg_NORM, i_Job_i::GetResources(), ipc_EXEC_m, i_JobParams::jobID, log_DBG_m, log_ERR_m, log_FUNC_m, i_Job_i::m_iJobParams, i_Job_i::m_rm, i_Job_i::SetResProcessed(), and i_Job_i::SetResReleased().

Referenced by CompleteJob(), and MediumOperationComplete().

                                                       {
    log_FUNC_m(ReleaseResources);
    log_DBG_m(dbg_DETAIL,"Freeing up resources");

    { //free up resources
        try {
            log_DBG_m(dbg_LOW, "ReleaseResource for jobId:" << m_iJobParams.jobID);
            i_ResourceList_t resList;
            ipc_EXEC_m(
                resList.length(1);
                resList[0] = GetResources()[a_medNum];
                m_rm->ReleaseResource(m_iJobParams, resList);
            );
            SetResReleased(a_medNum);
            SetResProcessed(a_medNum);
        } 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_MaintFriJob_i::RequestResources (  ) 

RM-> ask for resources

Definition at line 854 of file i_maintfrijob_impl.cpp.

References dbg_LOW, dbg_NORM, EndOfFRIInput(), i_Job_i::GetResources(), i_UNKNOWN, InsertToFriProcessor(), ipc_EXEC_m, i_Job_i::IsAborted(), job_MED_PROC, log_DBG_m, log_FUNC_m, ipc_Log::LogResources(), m_allFriRead, i_Job_i::m_iJob, i_Job_i::m_iJobParams, m_mediumInfoVec, friVolStatus_t::m_read, i_Job_i::m_rm, i_Job_i::m_status, friVolStatus_t::m_volInfo, i_Job_i::SetResMedOpComplete(), i_Job_i::SetResRequested(), i_Job_i::SetStatus(), and i_VolInfo_t::volNum.

Referenced by Execute().

                                      {
    log_FUNC_m(RequestResources);
    log_DBG_m(dbg_NORM,"Will call RM->GetResources now");

    if (IsAborted())
        return;
    ipc_EXEC_m(
        SetStatus(job_MED_PROC);

        bool needResources(false);
        for (UInt32_t i = 0; i < GetResources().length(); i++ ) {
            if (!m_mediumInfoVec[i].m_allFriRead) {
                log_DBG_m(dbg_LOW,"Requesting Resources for " <<
                                    ipc_Log::LogResources(GetResources()[i]));
                needResources = true;
                log_DBG_m(dbg_LOW,"Request resource for " << i << ".");
                SetResRequested(i);

                i_ResourceList_t resList;
                resList.length(1);
                resList[0] = GetResources()[i];
                m_rm->GetResources(m_iJob, m_iJobParams, resList);

                //vol open volumes inform fri_processor
                for (UInt32_t j(0); j <  m_mediumInfoVec[i].m_friVolStatus.size();j++){
                    friVolStatus_t & fri = m_mediumInfoVec[i].m_friVolStatus[j];
                    if (fri.m_read){
                        pm_FRIInfo friInfo(i, fri.m_volInfo.volNum, 0);
                        InsertToFriProcessor(friInfo);
                    }
                }
            }
            else {
                SetResMedOpComplete(i);

                log_DBG_m(dbg_LOW,"FRI for resource " << i << " already read.");
                for (UInt32_t j(0); j <  m_mediumInfoVec[i].m_friVolStatus.size();j++){
                    friVolStatus_t & fri = m_mediumInfoVec[i].m_friVolStatus[j];
                    pm_FRIInfo friInfo(i, fri.m_volInfo.volNum, 0);
                    InsertToFriProcessor(friInfo);
                }
            };
        }; //for all resources

        if(!needResources) {
            log_DBG_m(dbg_LOW, "No resources needed for this job");
            EndOfFRIInput();
            if (m_status == i_UNKNOWN){
                m_status = i_SUCCEDED;
            }
        }
    );
}

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class pm_AssignResThread [friend]

Definition at line 89 of file i_maintfrijob_impl.h.


Member Data Documentation

Reimplemented from i_Job_i.

Reimplemented in i_MediumCheckJob_i, and i_RecoveryJob_i.

Definition at line 160 of file i_maintfrijob_impl.h.

Definition at line 152 of file i_maintfrijob_impl.h.

Referenced by AllBeaFinished(), and RequestResources().

Definition at line 155 of file i_maintfrijob_impl.h.

Referenced by AbortFriProcessor(), EndOfFRIInput(), and InsertToFriProcessor().

Definition at line 129 of file i_maintfrijob_impl.h.

Referenced by CompleteJob(), and i_MaintFriJob_i().


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