/* preProcParaGet - preprocessing for parallel get. Basically it calls * rsDataGet to setup portalOprOut with the resource server. */ int preProcParaGet( rsComm_t *rsComm, int l1descInx, portalOprOut_t **portalOprOut ) { int status; dataOprInp_t dataOprInp; initDataOprInp( &dataOprInp, l1descInx, GET_OPR ); /* add RESC_HIER_STR_KW for getNumThreads */ if ( L1desc[l1descInx].dataObjInfo != NULL ) { //addKeyVal (&dataOprInp.condInput, RESC_NAME_KW, // L1desc[l1descInx].dataObjInfo->rescInfo->rescName); addKeyVal( &dataOprInp.condInput, RESC_HIER_STR_KW, L1desc[l1descInx].dataObjInfo->rescHier ); } if ( L1desc[l1descInx].remoteZoneHost != NULL ) { status = remoteDataGet( rsComm, &dataOprInp, portalOprOut, L1desc[l1descInx].remoteZoneHost ); } else { status = rsDataGet( rsComm, &dataOprInp, portalOprOut ); } if ( status >= 0 ) { ( *portalOprOut )->l1descInx = l1descInx; } clearKeyVal( &dataOprInp.condInput ); return status; }
int rsDataGet( rsComm_t *rsComm, dataOprInp_t *dataOprInp, portalOprOut_t **portalOprOut ) { int status; int remoteFlag; int l3descInx; rodsServerHost_t *rodsServerHost; l3descInx = dataOprInp->srcL3descInx; if ( getValByKey( &dataOprInp->condInput, EXEC_LOCALLY_KW ) != NULL ) { remoteFlag = LOCAL_HOST; } else { rodsServerHost = FileDesc[l3descInx].rodsServerHost; if ( rodsServerHost == NULL ) { rodsLog( LOG_NOTICE, "rsDataGet: NULL rodsServerHost" ); return SYS_INTERNAL_NULL_INPUT_ERR; } remoteFlag = rodsServerHost->localFlag; } if ( remoteFlag == LOCAL_HOST ) { status = _rsDataGet( rsComm, dataOprInp, portalOprOut ); } else { addKeyVal( &dataOprInp->condInput, EXEC_LOCALLY_KW, "" ); status = remoteDataGet( rsComm, dataOprInp, portalOprOut, rodsServerHost ); clearKeyVal( &dataOprInp->condInput ); } return status; }