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)  

getUtil.cpp
Go to the documentation of this file.
1 
3 #ifndef windows_platform
4 #include <sys/time.h>
5 #endif
6 #include "rodsPath.h"
7 #include "rodsErrorTable.h"
8 #include "rodsLog.h"
9 #include "lsUtil.h"
10 #include "getUtil.h"
11 #include "miscUtil.h"
12 #include "rcPortalOpr.h"
13 #include "sockComm.h"
14 #include "rcGlobalExtern.h"
15 
16 int
17 setSessionTicket( rcComm_t *myConn, char *ticket ) {
18  ticketAdminInp_t ticketAdminInp;
19  int status;
20 
21  ticketAdminInp.arg1 = "session";
22  ticketAdminInp.arg2 = ticket;
23  ticketAdminInp.arg3 = "";
24  ticketAdminInp.arg4 = "";
25  ticketAdminInp.arg5 = "";
26  ticketAdminInp.arg6 = "";
27  status = rcTicketAdmin( myConn, &ticketAdminInp );
28  if ( status != 0 ) {
29  printf( "set ticket error %d \n", status );
30  }
31  return status;
32 }
33 
34 int
35 getUtil( rcComm_t **myConn, rodsEnv *myRodsEnv, rodsArguments_t *myRodsArgs,
36  rodsPathInp_t *rodsPathInp ) {
37  int i = 0;
38  int status = 0;
39  int savedStatus = 0;
40  rodsPath_t *targPath = 0;
41  dataObjInp_t dataObjOprInp;
42  rodsRestart_t rodsRestart;
43  rcComm_t *conn = *myConn;
44 
45  if ( rodsPathInp == NULL ) {
46  return USER__NULL_INPUT_ERR;
47  }
48 
49  if ( myRodsArgs->ticket == True ) {
50  if ( myRodsArgs->ticketString == NULL ) {
52  "initCondForPut: NULL ticketString error" );
53  return USER__NULL_INPUT_ERR;
54  }
55  else {
56  setSessionTicket( conn, myRodsArgs->ticketString );
57  }
58  }
59 
60  initCondForGet( conn, myRodsArgs, &dataObjOprInp, &rodsRestart );
61 
62  if ( rodsPathInp->resolved == False ) {
63  status = resolveRodsTarget( conn, rodsPathInp, 1 );
64  if ( status < 0 ) {
66  "getUtil: resolveRodsTarget" );
67  return status;
68  }
69  rodsPathInp->resolved = True;
70  }
71 
72  /* initialize the progress struct */
73  if ( gGuiProgressCB != NULL ) {
74  bzero( &conn->operProgress, sizeof( conn->operProgress ) );
75  for ( i = 0; i < rodsPathInp->numSrc; i++ ) {
76  targPath = &rodsPathInp->targPath[i];
77  if ( targPath->objType == LOCAL_FILE_T ) {
79  if ( rodsPathInp->srcPath[i].size > 0 ) {
81  rodsPathInp->srcPath[i].size;
82  }
83  }
84  else {
85  getCollSizeForProgStat( conn, rodsPathInp->srcPath[i].outPath,
86  &conn->operProgress );
87  }
88  }
89  }
90 
91  if ( conn->fileRestart.flags == FILE_RESTART_ON ) {
92  fileRestartInfo_t *info;
93  status = readLfRestartFile( conn->fileRestart.infoFile, &info );
94  if ( status >= 0 ) {
95  status = lfRestartGetWithInfo( conn, info );
96  if ( status >= 0 ) {
97  /* save info so we know what got restarted and what not to
98  * delete in setStateForResume */
99  rstrcpy( conn->fileRestart.info.objPath, info->objPath,
100  MAX_NAME_LEN );
101  rstrcpy( conn->fileRestart.info.fileName, info->fileName,
102  MAX_NAME_LEN );
104  printf( "%s was restarted successfully\n",
105  conn->fileRestart.info.objPath );
106  unlink( conn->fileRestart.infoFile );
107  }
108  free( info );
109  }
110  }
111 
112  for ( i = 0; i < rodsPathInp->numSrc; i++ ) {
113  targPath = &rodsPathInp->targPath[i];
114 
115  if ( rodsPathInp->srcPath[i].rodsObjStat != NULL &&
116  rodsPathInp->srcPath[i].rodsObjStat->specColl != NULL ) {
117  dataObjOprInp.specColl =
118  rodsPathInp->srcPath[i].rodsObjStat->specColl;
119  }
120  else {
121  dataObjOprInp.specColl = NULL;
122  }
123  if ( targPath->objType == LOCAL_FILE_T ) {
124  rmKeyVal( &dataObjOprInp.condInput, TRANSLATED_PATH_KW );
125  status = getDataObjUtil( conn, rodsPathInp->srcPath[i].outPath,
126  targPath->outPath, rodsPathInp->srcPath[i].size,
127  rodsPathInp->srcPath[i].objMode,
128  myRodsArgs, &dataObjOprInp );
129  }
130  else if ( targPath->objType == LOCAL_DIR_T ) {
131  setStateForRestart( &rodsRestart, targPath, myRodsArgs );
132  addKeyVal( &dataObjOprInp.condInput, TRANSLATED_PATH_KW, "" );
133  status = getCollUtil( myConn, rodsPathInp->srcPath[i].outPath,
134  targPath->outPath, myRodsEnv, myRodsArgs, &dataObjOprInp,
135  &rodsRestart );
136  }
137  else {
138  /* should not be here */
140  "getUtil: invalid get dest objType %d for %s",
141  targPath->objType, targPath->outPath );
142  return USER_INPUT_PATH_ERR;
143  }
144  /* XXXX may need to return a global status */
145  if ( status < 0 ) {
147  "getUtil: get error for %s",
148  targPath->outPath );
149  savedStatus = status;
150  break;
151  }
152  }
153 
154  if ( rodsRestart.fd > 0 ) {
155  close( rodsRestart.fd );
156  }
157  if ( savedStatus < 0 ) {
158  status = savedStatus;
159  }
160  else if ( status == CAT_NO_ROWS_FOUND ) {
161  status = 0;
162  }
163 
164  if ( status < 0 && myRodsArgs->retries == True ) {
165  int reconnFlag;
166  /* this is recursive. Only do it the first time */
167  myRodsArgs->retries = False;
168  if ( myRodsArgs->reconnect == True ) {
169  reconnFlag = RECONN_TIMEOUT;
170  }
171  else {
172  reconnFlag = NO_RECONN;
173  }
174  while ( myRodsArgs->retriesValue > 0 ) {
175  rErrMsg_t errMsg;
176  bzero( &errMsg, sizeof( errMsg ) );
177  status = rcReconnect( myConn, myRodsEnv->rodsHost, myRodsEnv,
178  reconnFlag );
179  if ( status < 0 ) {
181  "getUtil: rcReconnect error for %s", targPath->outPath );
182  return status;
183  }
184  status = getUtil( myConn, myRodsEnv, myRodsArgs, rodsPathInp );
185  if ( status >= 0 ) {
186  printf( "Retry get successful\n" );
187  break;
188  }
189  else {
191  "getUtil: retry getUtil error" );
192  }
193  myRodsArgs->retriesValue--;
194  }
195  }
196  return status;
197 }
198 
199 int
200 getDataObjUtil( rcComm_t *conn, char *srcPath, char *targPath,
201  rodsLong_t srcSize, uint dataMode,
202  rodsArguments_t *rodsArgs, dataObjInp_t *dataObjOprInp ) {
203  int status;
204  struct timeval startTime, endTime;
205 
206  if ( srcPath == NULL || targPath == NULL ) {
208  "getDataObjUtil: NULL srcPath or targPath input" );
209  return USER__NULL_INPUT_ERR;
210  }
211 
212  if ( conn->fileRestart.info.status == FILE_RESTARTED &&
213  strcmp( conn->fileRestart.info.objPath, srcPath ) == 0 ) {
214  /* it was restarted */
216  return 0;
217  }
218 
219  if ( rodsArgs->verbose == True ) {
220  ( void ) gettimeofday( &startTime, ( struct timezone * )0 );
221  }
222 
223  if ( gGuiProgressCB != NULL ) {
224  rstrcpy( conn->operProgress.curFileName, srcPath, MAX_NAME_LEN );
225  conn->operProgress.curFileSize = srcSize;
226  conn->operProgress.curFileSizeDone = 0;
227  conn->operProgress.flag = 0;
228  gGuiProgressCB( &conn->operProgress );
229  }
230 
231  rstrcpy( dataObjOprInp->objPath, srcPath, MAX_NAME_LEN );
232  /* rcDataObjGet verifies dataSize if given */
233  if ( rodsArgs->replNum == True || rodsArgs->resource == True ) {
234  /* don't verify because it may be an old copy and hence the size
235  * could be wrong */
236  dataObjOprInp->dataSize = 0;
237  }
238  else {
239  dataObjOprInp->dataSize = srcSize;
240  }
241 
242  status = rcDataObjGet( conn, dataObjOprInp, targPath );
243 
244  if ( status >= 0 ) {
245  /* old objState use numCopies in place of dataMode.
246  * Just a sanity check */
247  if ( strcmp( targPath, STDOUT_FILE_NAME ) ) {
248  myChmod( targPath, dataMode );
249  }
250  if ( rodsArgs->verbose == True ) {
251  ( void ) gettimeofday( &endTime, ( struct timezone * )0 );
252  printTiming( conn, dataObjOprInp->objPath, srcSize,
253  strcmp( targPath, STDOUT_FILE_NAME ) ? targPath : NULL,
254  &startTime, &endTime );
255  }
256  if ( gGuiProgressCB != NULL ) {
258  conn->operProgress.totalFileSizeDone += srcSize;
259  }
260  }
261 
262  return status;
263 }
264 
265 int
267  dataObjInp_t *dataObjOprInp, rodsRestart_t *rodsRestart ) {
268  char *tmpStr;
269 
270  if ( dataObjOprInp == NULL ) {
272  "initCondForGet: NULL dataObjOprInp input" );
273  return USER__NULL_INPUT_ERR;
274  }
275 
276  memset( dataObjOprInp, 0, sizeof( dataObjInp_t ) );
277 
278  if ( rodsArgs == NULL ) {
279  return 0;
280  }
281 
282  dataObjOprInp->oprType = GET_OPR;
283 
284  if ( rodsArgs->kv_pass ) {
285  addKeyVal(
286  &dataObjOprInp->condInput,
288  rodsArgs->kv_pass_string );
289 
290  }
291 
292  if ( rodsArgs->force == True ) {
293  addKeyVal( &dataObjOprInp->condInput, FORCE_FLAG_KW, "" );
294  }
295 
296  if ( rodsArgs->verifyChecksum == True ) {
297  addKeyVal( &dataObjOprInp->condInput, VERIFY_CHKSUM_KW, "" );
298  }
299 
300 #ifdef windows_platform
301  dataObjOprInp->numThreads = NO_THREADING;
302 #else
303  if ( rodsArgs->number == True ) {
304  if ( rodsArgs->numberValue == 0 ) {
305  dataObjOprInp->numThreads = NO_THREADING;
306  }
307  else {
308  dataObjOprInp->numThreads = rodsArgs->numberValue;
309  }
310  }
311 #endif
312 
313  if ( rodsArgs->replNum == True ) {
314  addKeyVal( &dataObjOprInp->condInput, REPL_NUM_KW,
315  rodsArgs->replNumValue );
316  }
317 
318  if ( rodsArgs->resource == True ) {
319  if ( rodsArgs->resourceString == NULL ) {
321  "initCondForPut: NULL resourceString error" );
322  return USER__NULL_INPUT_ERR;
323  }
324  else {
325  addKeyVal( &dataObjOprInp->condInput, RESC_NAME_KW,
326  rodsArgs->resourceString );
327  }
328  }
329 
330  if ( rodsArgs->ticket == True ) {
331  if ( rodsArgs->ticketString == NULL ) {
333  "initCondForPut: NULL ticketString error" );
334  return USER__NULL_INPUT_ERR;
335  }
336  else {
337  addKeyVal( &dataObjOprInp->condInput, TICKET_KW,
338  rodsArgs->ticketString );
339  }
340  }
341 
342 
343  if ( rodsArgs->rbudp == True ) {
344  /* use -Q for rbudp transfer */
345  addKeyVal( &dataObjOprInp->condInput, RBUDP_TRANSFER_KW, "" );
346  }
347 
348  if ( rodsArgs->veryVerbose == True ) {
349  addKeyVal( &dataObjOprInp->condInput, VERY_VERBOSE_KW, "" );
350  }
351 
352  if ( ( tmpStr = getenv( RBUDP_SEND_RATE_KW ) ) != NULL ) {
353  addKeyVal( &dataObjOprInp->condInput, RBUDP_SEND_RATE_KW, tmpStr );
354  }
355 
356  if ( ( tmpStr = getenv( RBUDP_PACK_SIZE_KW ) ) != NULL ) {
357  addKeyVal( &dataObjOprInp->condInput, RBUDP_PACK_SIZE_KW, tmpStr );
358  }
359 
360  if ( rodsArgs->purgeCache == True ) { // JMC - backport 4537
361  addKeyVal( &dataObjOprInp->condInput, PURGE_CACHE_KW, "" );
362  }
363 
364  memset( rodsRestart, 0, sizeof( rodsRestart_t ) );
365  if ( rodsArgs->restart == True ) {
366  int status;
367  status = openRestartFile( rodsArgs->restartFileString, rodsRestart );
368  if ( status < 0 ) {
370  "initCondForPut: openRestartFile of %s errno",
371  rodsArgs->restartFileString );
372  return status;
373  }
374  }
375 
376  if ( rodsArgs->retries == True && rodsArgs->restart == False &&
377  rodsArgs->lfrestart == False ) {
379  "initCondForGet: --retries must be used with -X option" );
380  return USER_INPUT_OPTION_ERR;
381  }
382 
383  if ( rodsArgs->lfrestart == True ) {
384  if ( rodsArgs->rbudp == True ) {
386  "initCondForPut: --lfrestart cannot be used with -Q option" );
387  }
388  else {
391  MAX_NAME_LEN );
392  }
393  }
394  // =-=-=-=-=-=-=-
395  // JMC - backport 4604
396  if ( rodsArgs->rlock == True ) {
397  addKeyVal( &dataObjOprInp->condInput, LOCK_TYPE_KW, READ_LOCK_TYPE );
398  }
399  // =-=-=-=-=-=-=-
400  // =-=-=-=-=-=-=-
401  // JMC - backport 4612
402  if ( rodsArgs->wlock == True ) {
403  rodsLog( LOG_ERROR, "initCondForPut: --wlock not supported, changing it to --rlock" );
404  addKeyVal( &dataObjOprInp->condInput, LOCK_TYPE_KW, READ_LOCK_TYPE );
405  }
406  // =-=-=-=-=-=-=-
407  dataObjOprInp->openFlags = O_RDONLY;
408 
409  return 0;
410 }
411 
412 int
413 getCollUtil( rcComm_t **myConn, char *srcColl, char *targDir,
414  rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs, dataObjInp_t *dataObjOprInp,
415  rodsRestart_t *rodsRestart ) {
416  int status = 0;
417  int savedStatus = 0;
418  char srcChildPath[MAX_NAME_LEN], targChildPath[MAX_NAME_LEN];
419  char parPath[MAX_NAME_LEN], childPath[MAX_NAME_LEN];
420  collHandle_t collHandle;
421  collEnt_t collEnt;
422  dataObjInp_t childDataObjInp;
423  rcComm_t *conn;
424 
425  if ( srcColl == NULL || targDir == NULL ) {
427  "getCollUtil: NULL srcColl or targDir input" );
428  return USER__NULL_INPUT_ERR;
429  }
430 
431  if ( rodsArgs->recursive != True ) {
433  "getCollUtil: -r option must be used for getting %s collection",
434  targDir );
435  return USER_INPUT_OPTION_ERR;
436  }
437 
438  if ( rodsArgs->redirectConn == True ) {
439  int reconnFlag;
440  if ( rodsArgs->reconnect == True ) {
441  reconnFlag = RECONN_TIMEOUT;
442  }
443  else {
444  reconnFlag = NO_RECONN;
445  }
446  /* reconnect to the resource server */
447  rstrcpy( dataObjOprInp->objPath, srcColl, MAX_NAME_LEN );
448  redirectConnToRescSvr( myConn, dataObjOprInp, myRodsEnv, reconnFlag );
449  rodsArgs->redirectConn = 0; /* only do it once */
450  }
451  conn = *myConn;
452 
453  printCollOrDir( targDir, LOCAL_DIR_T, rodsArgs, dataObjOprInp->specColl );
454  status = rclOpenCollection( conn, srcColl, 0, &collHandle );
455 
456  if ( status < 0 ) {
458  "getCollUtil: rclOpenCollection of %s error. status = %d",
459  srcColl, status );
460  return status;
461  }
462  while ( ( status = rclReadCollection( conn, &collHandle, &collEnt ) ) >= 0 ) {
463  if ( collEnt.objType == DATA_OBJ_T ) {
464  rodsLong_t mySize;
465 
466  mySize = collEnt.dataSize; /* have to save it. May be freed */
467 
468  snprintf( targChildPath, MAX_NAME_LEN, "%s/%s",
469  targDir, collEnt.dataName );
470  snprintf( srcChildPath, MAX_NAME_LEN, "%s/%s",
471  collEnt.collName, collEnt.dataName );
472 
473  int status = chkStateForResume( conn, rodsRestart, targChildPath,
474  rodsArgs, LOCAL_FILE_T, &dataObjOprInp->condInput, 1 );
475 
476  if ( status < 0 ) {
477  /* restart failed */
478  break;
479  }
480  else if ( status == 0 ) {
481  continue;
482  }
483 
484  status = getDataObjUtil( conn, srcChildPath, targChildPath, mySize,
485  collEnt.dataMode, rodsArgs, dataObjOprInp );
486  if ( status < 0 ) {
488  "getCollUtil: getDataObjUtil failed for %s. status = %d",
489  srcChildPath, status );
490  savedStatus = status;
491  if ( rodsRestart->fd > 0 ) {
492  break;
493  }
494  }
495  else {
496  status = procAndWriteRestartFile( rodsRestart, targChildPath );
497  if ( status < 0 ) {
499  "getCollUtil: procAndWriteRestartFile failed for %s. status = %d",
500  targChildPath, status );
501  savedStatus = status;
502  }
503  }
504  }
505  else if ( collEnt.objType == COLL_OBJ_T ) {
506  if ( ( status = splitPathByKey(
507  collEnt.collName, parPath, MAX_NAME_LEN, childPath, MAX_NAME_LEN, '/' ) ) < 0 ) {
509  "getCollUtil:: splitPathByKey for %s error, status = %d",
510  collEnt.collName, status );
511  return status;
512  }
513  snprintf( targChildPath, MAX_NAME_LEN, "%s/%s",
514  targDir, childPath );
515 
516  mkdirR( targDir, targChildPath, 0750 );
517 
518  /* the child is a spec coll. need to drill down */
519  childDataObjInp = *dataObjOprInp;
520  if ( collEnt.specColl.collClass != NO_SPEC_COLL ) {
521  childDataObjInp.specColl = &collEnt.specColl;
522  }
523  else {
524  childDataObjInp.specColl = NULL;
525  }
526  int status = getCollUtil( myConn, collEnt.collName, targChildPath,
527  myRodsEnv, rodsArgs, &childDataObjInp, rodsRestart );
528  if ( status < 0 && status != CAT_NO_ROWS_FOUND ) {
530  "getCollUtil: getCollUtil failed for %s. status = %d",
531  collEnt.collName, status );
532  savedStatus = status;
533  if ( rodsRestart->fd > 0 ) {
534  break;
535  }
536  }
537  }
538  }
539  rclCloseCollection( &collHandle );
540 
541  if ( savedStatus < 0 ) {
542  return savedStatus;
543  }
544  else if ( status == CAT_NO_ROWS_FOUND ||
546  return 0;
547  }
548  else {
549  return status;
550  }
551 }
552 
RBUDP_SEND_RATE_KW
#define RBUDP_SEND_RATE_KW
Definition: rodsKeyWdDef.h:78
rodsArguments_t::restartFileString
char * restartFileString
Definition: parseCommandLine.h:117
rodsLog
void rodsLog(int level, const char *formatStr,...)
Definition: rodsLog.cpp:86
DataObjInp::objPath
char objPath[(1024+64)]
Definition: dataObjInpOut.h:66
RESC_NAME_KW
#define RESC_NAME_KW
Definition: rodsKeyWdDef.h:19
LOCK_TYPE_KW
#define LOCK_TYPE_KW
Definition: rodsKeyWdDef.h:115
rcComm_t
Definition: rcConnect.h:95
NULL
#define NULL
Definition: rodsDef.h:70
fileRestart_t::info
fileRestartInfo_t info
Definition: rcConnect.h:85
RodsPath::rodsObjStat
rodsObjStat_t * rodsObjStat
Definition: rodsPath.h:27
True
#define True
Definition: parseCommandLine.h:11
getUtil.h
addKeyVal
int addKeyVal(keyValPair_t *condInput, const char *keyWord, const char *value)
Definition: rcMisc.cpp:789
rodsPath.h
rclOpenCollection
int rclOpenCollection(rcComm_t *conn, char *collection, int flag, collHandle_t *collHandle)
Definition: miscUtil.cpp:1057
rodsArguments_t::ticketString
char * ticketString
Definition: parseCommandLine.h:99
DataObjInp::openFlags
int openFlags
Definition: dataObjInpOut.h:68
rErrMsg_t
Definition: rodsError.h:19
OperProgress::flag
int flag
Definition: guiProgressCallback.h:9
rodsArguments_t
Definition: parseCommandLine.h:14
RodsPathInp::resolved
int resolved
Definition: rodsPath.h:39
fileRestart_t::infoFile
char infoFile[(1024+64)]
Definition: rcConnect.h:84
DataObjInp::specColl
specColl_t * specColl
Definition: dataObjInpOut.h:73
rodsArguments_t::retriesValue
int retriesValue
Definition: parseCommandLine.h:122
rodsArguments_t::rbudp
int rbudp
Definition: parseCommandLine.h:83
procAndWriteRestartFile
int procAndWriteRestartFile(rodsRestart_t *rodsRestart, char *donePath)
Definition: rcMisc.cpp:2700
RBUDP_TRANSFER_KW
#define RBUDP_TRANSFER_KW
Definition: rodsKeyWdDef.h:76
RodsPathInp
Definition: rodsPath.h:33
collHandle_t
Definition: miscUtil.h:97
DataObjInp::dataSize
rodsLong_t dataSize
Definition: dataObjInpOut.h:70
rcTicketAdmin
int rcTicketAdmin(rcComm_t *conn, ticketAdminInp_t *ticketAdminInp)
Definition: rcTicketAdmin.cpp:9
rodsArguments_t::verbose
int verbose
Definition: parseCommandLine.h:107
OperProgress::curFileSize
rodsLong_t curFileSize
Definition: guiProgressCallback.h:15
CollEnt::collName
char * collName
Definition: miscUtil.h:119
lsUtil.h
SYS_SPEC_COLL_OBJ_NOT_EXIST
@ SYS_SPEC_COLL_OBJ_NOT_EXIST
Definition: rodsErrorTable.h:123
getCollUtil
int getCollUtil(rcComm_t **myConn, char *srcColl, char *targDir, rodsEnv *myRodsEnv, rodsArguments_t *rodsArgs, dataObjInp_t *dataObjOprInp, rodsRestart_t *rodsRestart)
Definition: getUtil.cpp:413
OperProgress::curFileSizeDone
rodsLong_t curFileSizeDone
Definition: guiProgressCallback.h:16
readLfRestartFile
int readLfRestartFile(char *infoFile, fileRestartInfo_t **info)
Definition: rcPortalOpr.cpp:1475
resolveRodsTarget
int resolveRodsTarget(rcComm_t *conn, rodsPathInp_t *rodsPathInp, int oprType)
Definition: miscUtil.cpp:2342
fileRestartInfo_t::objPath
char objPath[(1024+64)]
Definition: rcConnect.h:74
CollEnt::dataSize
rodsLong_t dataSize
Definition: miscUtil.h:118
OperProgress::totalFileSize
rodsLong_t totalFileSize
Definition: guiProgressCallback.h:11
OperProgress::totalFileSizeDone
rodsLong_t totalFileSizeDone
Definition: guiProgressCallback.h:13
rodsArguments_t::rlock
int rlock
Definition: parseCommandLine.h:58
mkdirR
int mkdirR(char *startDir, char *destDir, int mode)
Definition: miscUtil.cpp:106
initCondForGet
int initCondForGet(rcComm_t *conn, rodsArguments_t *rodsArgs, dataObjInp_t *dataObjOprInp, rodsRestart_t *rodsRestart)
Definition: getUtil.cpp:266
REPL_NUM_KW
#define REPL_NUM_KW
Definition: rodsKeyWdDef.h:30
gGuiProgressCB
guiProgressCallback gGuiProgressCB
Definition: rcGlobal.cpp:207
rodsArguments_t::resource
int resource
Definition: parseCommandLine.h:86
rcGlobalExtern.h
RodsPathInp::srcPath
rodsPath_t * srcPath
Definition: rodsPath.h:35
rodsArguments_t::kv_pass_string
char * kv_pass_string
Definition: parseCommandLine.h:141
LOG_ERROR
#define LOG_ERROR
Definition: rodsLog.h:43
RodsPath::objType
objType_t objType
Definition: rodsPath.h:19
NO_THREADING
#define NO_THREADING
Definition: rodsDef.h:100
ticketAdminInp_t::arg1
char * arg1
Definition: ticketAdmin.h:7
GET_OPR
#define GET_OPR
Definition: dataObjInpOut.h:168
OperProgress::curFileName
char curFileName[MAX_NAME_LEN]
Definition: guiProgressCallback.h:14
PURGE_CACHE_KW
#define PURGE_CACHE_KW
Definition: rodsKeyWdDef.h:110
FILE_RESTART_ON
@ FILE_RESTART_ON
Definition: rcConnect.h:64
OperProgress::totalNumFilesDone
rodsLong_t totalNumFilesDone
Definition: guiProgressCallback.h:12
COLL_OBJ_T
@ COLL_OBJ_T
Definition: rodsType.h:39
RECONN_TIMEOUT
#define RECONN_TIMEOUT
Definition: rcConnect.h:36
RodsPathInp::targPath
rodsPath_t * targPath
Definition: rodsPath.h:37
ticketAdminInp_t::arg6
char * arg6
Definition: ticketAdmin.h:12
rodsArguments_t::redirectConn
int redirectConn
Definition: parseCommandLine.h:51
rodsArguments_t::ticket
int ticket
Definition: parseCommandLine.h:98
rodsArguments_t::verifyChecksum
int verifyChecksum
Definition: parseCommandLine.h:53
redirectConnToRescSvr
int redirectConnToRescSvr(rcComm_t **conn, dataObjInp_t *dataObjInp, rodsEnv *myEnv, int reconnFlag)
Definition: sockComm.cpp:1520
myChmod
int myChmod(char *inPath, uint dataMode)
Definition: miscUtil.cpp:1815
rclCloseCollection
int rclCloseCollection(collHandle_t *collHandle)
Definition: miscUtil.cpp:1354
VERY_VERBOSE_KW
#define VERY_VERBOSE_KW
Definition: rodsKeyWdDef.h:77
rcDataObjGet
int rcDataObjGet(rcComm_t *conn, dataObjInp_t *dataObjInp, char *locFilePath)
Definition: rcDataObjGet.cpp:91
setStateForRestart
int setStateForRestart(rodsRestart_t *rodsRestart, rodsPath_t *targPath, rodsArguments_t *rodsArgs)
Definition: rcMisc.cpp:2714
CollEnt
Definition: miscUtil.h:113
OperProgress::totalNumFiles
rodsLong_t totalNumFiles
Definition: guiProgressCallback.h:10
rodsArguments_t::purgeCache
int purgeCache
Definition: parseCommandLine.h:78
rodsArguments_t::veryVerbose
int veryVerbose
Definition: parseCommandLine.h:108
CollEnt::specColl
specColl_t specColl
Definition: miscUtil.h:130
DataObjInp
Definition: dataObjInpOut.h:65
fileRestartInfo_t::status
fileRestartStatus_t status
Definition: rcConnect.h:76
MAX_NAME_LEN
#define MAX_NAME_LEN
Definition: rodsDef.h:61
ticketAdminInp_t::arg2
char * arg2
Definition: ticketAdmin.h:8
RBUDP_PACK_SIZE_KW
#define RBUDP_PACK_SIZE_KW
Definition: rodsKeyWdDef.h:79
lfRestartGetWithInfo
int lfRestartGetWithInfo(rcComm_t *conn, fileRestartInfo_t *info)
Definition: rcPortalOpr.cpp:1710
TICKET_KW
#define TICKET_KW
Definition: rodsKeyWdDef.h:109
rmKeyVal
int rmKeyVal(keyValPair_t *condInput, const char *keyWord)
Definition: rcMisc.cpp:710
RodsPath::size
rodsLong_t size
Definition: rodsPath.h:21
rcReconnect
int rcReconnect(rcComm_t **conn, char *newHost, rodsEnv *myEnv, int reconnFlag)
Definition: sockComm.cpp:1547
getCollSizeForProgStat
int getCollSizeForProgStat(rcComm_t *conn, char *srcColl, operProgress_t *operProgress)
Definition: miscUtil.cpp:1920
irods.pypyodbc.status
status
Definition: pypyodbc.py:467
NO_SPEC_COLL
@ NO_SPEC_COLL
Definition: objInfo.h:46
TRANSLATED_PATH_KW
#define TRANSLATED_PATH_KW
Definition: rodsKeyWdDef.h:97
rodsArguments_t::retries
int retries
Definition: parseCommandLine.h:121
rcComm_t::operProgress
operProgress_t operProgress
Definition: rcConnect.h:119
splitPathByKey
int splitPathByKey(const char *srcPath, char *dir, size_t maxDirLen, char *file, size_t maxFileLen, char key)
Definition: stringOpr.cpp:222
rodsLog.h
rodsArguments_t::resourceString
char * resourceString
Definition: parseCommandLine.h:87
FILE_NOT_RESTART
@ FILE_NOT_RESTART
Definition: rcConnect.h:68
KEY_VALUE_PASSTHROUGH_KW
#define KEY_VALUE_PASSTHROUGH_KW
Definition: rodsKeyWdDef.h:284
LOG_NOTICE
#define LOG_NOTICE
Definition: rodsLog.h:33
CollEnt::dataMode
uint dataMode
Definition: miscUtil.h:117
rcPortalOpr.h
fileRestartInfo_t
Definition: rcConnect.h:72
rodsRestart_t
Definition: rodsDef.h:317
rcComm_t::fileRestart
fileRestart_t fileRestart
Definition: rcConnect.h:135
rodsArguments_t::wlock
int wlock
Definition: parseCommandLine.h:59
rodsArguments_t::force
int force
Definition: parseCommandLine.h:38
DATA_OBJ_T
@ DATA_OBJ_T
Definition: rodsType.h:38
ticketAdminInp_t::arg3
char * arg3
Definition: ticketAdmin.h:9
ticketAdminInp_t::arg4
char * arg4
Definition: ticketAdmin.h:10
fileRestartInfo_t::fileName
char fileName[(1024+64)]
Definition: rcConnect.h:73
CollEnt::dataName
char * dataName
Definition: miscUtil.h:120
fileRestart_t::flags
fileRestartFlag_t flags
Definition: rcConnect.h:82
RodsPath::outPath
char outPath[(1024+64)]
Definition: rodsPath.h:24
rodsArguments_t::kv_pass
int kv_pass
Definition: parseCommandLine.h:140
printTiming
int printTiming(rcComm_t *conn, char *objPath, rodsLong_t fileSize, char *localFile, struct timeval *startTime, struct timeval *endTime)
Definition: miscUtil.cpp:396
rodsRestart_t::fd
int fd
Definition: rodsDef.h:319
rodsArguments_t::recursive
int recursive
Definition: parseCommandLine.h:85
FORCE_FLAG_KW
#define FORCE_FLAG_KW
Definition: rodsKeyWdDef.h:13
RodsPath::objMode
uint objMode
Definition: rodsPath.h:22
DataObjInp::oprType
int oprType
Definition: dataObjInpOut.h:72
CAT_NO_ROWS_FOUND
@ CAT_NO_ROWS_FOUND
Definition: rodsErrorTable.h:423
rodsArguments_t::lfrestart
int lfrestart
Definition: parseCommandLine.h:118
ticketAdminInp_t::arg5
char * arg5
Definition: ticketAdmin.h:11
getDataObjUtil
int getDataObjUtil(rcComm_t *conn, char *srcPath, char *targPath, rodsLong_t srcSize, uint dataMode, rodsArguments_t *rodsArgs, dataObjInp_t *dataObjOprInp)
Definition: getUtil.cpp:200
getUtil
int getUtil(rcComm_t **myConn, rodsEnv *myRodsEnv, rodsArguments_t *myRodsArgs, rodsPathInp_t *rodsPathInp)
Definition: getUtil.cpp:35
VERIFY_CHKSUM_KW
#define VERIFY_CHKSUM_KW
Definition: rodsKeyWdDef.h:16
USER_INPUT_OPTION_ERR
@ USER_INPUT_OPTION_ERR
Definition: rodsErrorTable.h:249
openRestartFile
int openRestartFile(char *restartFile, rodsRestart_t *rodsRestart)
Definition: rcMisc.cpp:2552
LOCAL_DIR_T
@ LOCAL_DIR_T
Definition: rodsType.h:42
rodsLogError
void rodsLogError(int level, int errCode, char *formatStr,...)
Definition: rodsLog.cpp:422
RodsPathInp::numSrc
int numSrc
Definition: rodsPath.h:34
ticketAdminInp_t
Definition: ticketAdmin.h:6
rodsArguments_t::lfrestartFileString
char * lfrestartFileString
Definition: parseCommandLine.h:119
rodsArguments_t::replNum
int replNum
Definition: parseCommandLine.h:63
READ_LOCK_TYPE
#define READ_LOCK_TYPE
Definition: dataObjLock.h:9
chkStateForResume
int chkStateForResume(rcComm_t *conn, rodsRestart_t *rodsRestart, char *targPath, rodsArguments_t *rodsArgs, objType_t objType, keyValPair_t *condInput, int deleteFlag)
Definition: putUtil.cpp:34
CollEnt::objType
objType_t objType
Definition: miscUtil.h:114
sockComm.h
rclReadCollection
int rclReadCollection(rcComm_t *conn, collHandle_t *collHandle, collEnt_t *collEnt)
Definition: miscUtil.cpp:1108
setSessionTicket
int setSessionTicket(rcComm_t *myConn, char *ticket)
Definition: getUtil.cpp:17
rodsErrorTable.h
False
#define False
Definition: parseCommandLine.h:12
rodsObjStat::specColl
specColl_t * specColl
Definition: objStat.h:18
RodsPath
Definition: rodsPath.h:18
miscUtil.h
printCollOrDir
void printCollOrDir(char *myName, objType_t myType, rodsArguments_t *rodsArgs, specColl_t *specColl)
Definition: lsUtil.cpp:745
rodsArguments_t::numberValue
int numberValue
Definition: parseCommandLine.h:69
rstrcpy
char * rstrcpy(char *dest, const char *src, int maxLen)
Definition: stringOpr.cpp:51
LOCAL_FILE_T
@ LOCAL_FILE_T
Definition: rodsType.h:41
DataObjInp::condInput
keyValPair_t condInput
Definition: dataObjInpOut.h:74
FILE_RESTARTED
@ FILE_RESTARTED
Definition: rcConnect.h:69
rodsEnv
Definition: getRodsEnv.h:8
rodsArguments_t::reconnect
int reconnect
Definition: parseCommandLine.h:103
NO_RECONN
#define NO_RECONN
Definition: rcConnect.h:34
rodsArguments_t::replNumValue
char * replNumValue
Definition: parseCommandLine.h:64
USER_INPUT_PATH_ERR
@ USER_INPUT_PATH_ERR
Definition: rodsErrorTable.h:248
rodsArguments_t::restart
int restart
Definition: parseCommandLine.h:116
rodsEnv::rodsHost
char rodsHost[64]
Definition: getRodsEnv.h:10
DataObjInp::numThreads
int numThreads
Definition: dataObjInpOut.h:71
STDOUT_FILE_NAME
#define STDOUT_FILE_NAME
Definition: rodsPath.h:16
rodsLong_t
long long rodsLong_t
Definition: rodsType.h:32
rodsArguments_t::number
int number
Definition: parseCommandLine.h:68
SpecColl::collClass
specCollClass_t collClass
Definition: objInfo.h:77
USER__NULL_INPUT_ERR
@ USER__NULL_INPUT_ERR
Definition: rodsErrorTable.h:247