irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

rsDataGet.cpp
Go to the documentation of this file.
1 
3 /* This is script-generated code (for the most part). */
4 /* See dataGet.h for a description of this API call.*/
5 
6 #include "rcMisc.h"
7 #include "dataGet.h"
8 #include "miscServerFunct.hpp"
9 #include "rsGlobalExtern.hpp"
10 #include "rcGlobalExtern.h"
11 #include "rsDataGet.hpp"
12 
13 /* rsDataGet - this routine setup portalOprOut with the resource server
14  * for parallel get operation.
15  */
16 
17 int
18 rsDataGet( rsComm_t *rsComm, dataOprInp_t *dataOprInp,
20  int status;
21  int remoteFlag;
22  int l3descInx;
24 
25  l3descInx = dataOprInp->srcL3descInx;
26 
27  if ( getValByKey( &dataOprInp->condInput, EXEC_LOCALLY_KW ) != NULL ) {
28  remoteFlag = LOCAL_HOST;
29  }
30  else {
32  if ( rodsServerHost == NULL ) {
33  rodsLog( LOG_NOTICE, "rsDataGet: NULL rodsServerHost" );
35  }
36  remoteFlag = rodsServerHost->localFlag;
37  }
38 
39  if ( remoteFlag == LOCAL_HOST ) {
40  status = _rsDataGet( rsComm, dataOprInp, portalOprOut );
41  }
42  else {
43  addKeyVal( &dataOprInp->condInput, EXEC_LOCALLY_KW, "" );
44  status = remoteDataGet( rsComm, dataOprInp, portalOprOut,
46  clearKeyVal( &dataOprInp->condInput );
47  }
48 
49 
50  return status;
51 }
52 
53 int
54 _rsDataGet( rsComm_t *rsComm, dataOprInp_t *dataOprInp,
57  rsComm,
58  dataOprInp,
59  GET_OPR,
60  portalOprOut );
61 
62 }
63 
64 int
65 remoteDataGet( rsComm_t *rsComm, dataOprInp_t *dataOprInp,
67  int status;
68 
69  if ( rodsServerHost == NULL ) {
71  "remoteDataGet: Invalid rodsServerHost" );
73  }
74 
75  if ( ( status = svrToSvrConnect( rsComm, rodsServerHost ) ) < 0 ) {
76  return status;
77  }
78 
79  dataOprInp->srcL3descInx = convL3descInx( dataOprInp->srcL3descInx );
80  status = rcDataGet( rodsServerHost->conn, dataOprInp, portalOprOut );
81 
82  return status;
83 }
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
getValByKey
char * getValByKey(const keyValPair_t *condInput, const char *keyWord)
Definition: rcMisc.cpp:675
NULL
#define NULL
Definition: rodsDef.h:70
rsComm_t
Definition: rcConnect.h:145
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
SYS_INTERNAL_NULL_INPUT_ERR
@ SYS_INTERNAL_NULL_INPUT_ERR
Definition: rodsErrorTable.h:92
rodsServerHost::localFlag
int localFlag
Definition: rodsConnect.h:68
DataOprInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:134
portalOprOut
Definition: dataObjInpOut.h:114
rodsServerHost::conn
rcComm_t * conn
Definition: rodsConnect.h:64
DataOprInp::srcL3descInx
int srcL3descInx
Definition: dataObjInpOut.h:125
rcMisc.h
LOCAL_HOST
#define LOCAL_HOST
Definition: rodsConnect.h:44
rsDataGet.hpp
remoteDataGet
int remoteDataGet(rsComm_t *rsComm, dataOprInp_t *dataOprInp, portalOprOut_t **portalOprOut, rodsServerHost_t *rodsServerHost)
Definition: rsDataGet.cpp:65
rcGlobalExtern.h
rsDataGet
int rsDataGet(rsComm_t *rsComm, dataOprInp_t *dataOprInp, portalOprOut_t **portalOprOut)
Definition: rsDataGet.cpp:18
GET_OPR
#define GET_OPR
Definition: dataObjInpOut.h:168
rsGlobalExtern.hpp
EXEC_LOCALLY_KW
#define EXEC_LOCALLY_KW
Definition: rodsKeyWdDef.h:12
rcDataGet
int rcDataGet(rcComm_t *conn, dataOprInp_t *dataGetInp, portalOprOut_t **portalOprOut)
Definition: rcDataGet.cpp:36
_rsDataGet
int _rsDataGet(rsComm_t *rsComm, dataOprInp_t *dataOprInp, portalOprOut_t **portalOprOut)
Definition: rsDataGet.cpp:54
fileDesc_t::rodsServerHost
rodsServerHost_t * rodsServerHost
Definition: fileOpr.hpp:26
SYS_INVALID_SERVER_HOST
@ SYS_INVALID_SERVER_HOST
Definition: rodsErrorTable.h:89
convL3descInx
int convL3descInx(int l3descInx)
Definition: objDesc.cpp:571
svrToSvrConnect
int svrToSvrConnect(rsComm_t *rsComm, rodsServerHost_t *rodsServerHost)
Definition: miscServerFunct.cpp:106
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
miscServerFunct.hpp
FileDesc
fileDesc_t FileDesc[1026]
Definition: irods_server_globals.cpp:28
rodsServerHost
Definition: rodsConnect.h:62
DataOprInp
Definition: dataObjInpOut.h:122
setupSrvPortalForParaOpr
int setupSrvPortalForParaOpr(rsComm_t *rsComm, dataOprInp_t *dataOprInp, int oprType, portalOprOut_t **portalOprOut)
Definition: miscServerFunct.cpp:138
clearKeyVal
int clearKeyVal(keyValPair_t *condInput)
Definition: rcMisc.cpp:1047
dataGet.h