Esempio n. 1
0
int
preProcParaPut( rsComm_t *rsComm, int l1descInx,
                portalOprOut_t **portalOprOut ) {
    int status;
    dataOprInp_t dataOprInp;

    initDataOprInp( &dataOprInp, l1descInx, PUT_OPR );
    /* add RESC_HIER_STR_KW for getNumThreads */
    if ( L1desc[l1descInx].dataObjInfo != NULL ) {
        addKeyVal( &dataOprInp.condInput, RESC_HIER_STR_KW,
                   L1desc[l1descInx].dataObjInfo->rescHier );
    }
    if ( L1desc[l1descInx].remoteZoneHost != NULL ) {
        status =  remoteDataPut( rsComm, &dataOprInp, portalOprOut,
                                 L1desc[l1descInx].remoteZoneHost );
    }
    else {
        status =  rsDataPut( rsComm, &dataOprInp, portalOprOut );
    }

    if ( status >= 0 ) {
        ( *portalOprOut )->l1descInx = l1descInx;
        L1desc[l1descInx].bytesWritten = dataOprInp.dataSize;
    }
    clearKeyVal( &dataOprInp.condInput );
    return status;
}
Esempio n. 2
0
/* 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 l3descInx;
    int status;
    dataOprInp_t dataOprInp;

    l3descInx = L1desc[l1descInx].l3descInx;

    initDataOprInp (&dataOprInp, l1descInx, GET_OPR);
    /* add RESC_NAME_KW for getNumThreads */
    if (L1desc[l1descInx].dataObjInfo != NULL && 
      L1desc[l1descInx].dataObjInfo->rescInfo != NULL) {
	addKeyVal (&dataOprInp.condInput, RESC_NAME_KW, 
	  L1desc[l1descInx].dataObjInfo->rescInfo->rescName);
    } 
    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);
}