Changeset 3588
- Timestamp:
- 10/31/2009 04:15:36 PM (3 weeks ago)
- Files:
-
- XrdHdfs/XrdHdfs.cc (modified) (5 diffs)
- XrdHdfs/XrdHdfs.hh (modified) (2 diffs)
- XrdHdfs/XrdHdfsConfig.cc (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
XrdHdfs/XrdHdfs.cc
r3552 r3588 9 9 /******************************************************************************/ 10 10 11 // $Id: XrdHdfs.cc,v 1.20 2008/06/09 10:44:30 ganis Exp $ 12 13 const char *XrdHdfsCVSID = "$Id: XrdHdfs.cc,v 1.20 2008/06/09 10:44:30 ganis Exp $"; 11 const char *XrdHdfsSVNID = "$Id$"; 14 12 15 13 #include <sys/types.h> … … 98 96 static const char *epname = "Opendir"; 99 97 #endif 98 int retc; 100 99 101 100 // Return an error if we have already opened … … 104 103 // Set up values for this directory object 105 104 // 105 if (XrdHdfsSS->the_N2N) { 106 char actual_path[XrdOssMAX_PATH_LEN+1]; 107 if ((retc = XrdHdfsSS->the_N2N->lfn2pfn(dir_path, actual_path, sizeof(actual_path)))) 108 return retc; 109 else fname = strdup(actual_path); 110 } 106 111 fname = strdup(dir_path); 107 112 dirPos = 0; … … 246 251 if (fh != NULL) 247 252 return -XRDOSS_E8003; 253 254 int retc; 255 if (XrdHdfsSS->the_N2N) { 256 char actual_path[XrdOssMAX_PATH_LEN+1]; 257 if ((retc = XrdHdfsSS->the_N2N->lfn2pfn(dir_path, actual_path, sizeof(actual_path)))) 258 return retc; 259 else fname = strdup(actual_path); 260 } 248 261 fname = strdup(path); 249 262 … … 473 486 /* F i l e S y s t e m O b j e c t I n t e r f a c e s */ 474 487 /******************************************************************************/ 475 488 489 /******************************************************************************/ 490 /* I n i t */ 491 /******************************************************************************/ 492 493 /* 494 Function: Initialize HDFS system. 495 496 Input: None 497 498 Output: Returns zero upon success otherwise (-errno). 499 */ 500 int XrdHdfsSys::Init(XrdSysLogger *lp, const char *configfn) 501 { 502 int NoGo; 503 const char *tmp; 504 505 // Do the herald thing 506 // 507 eDest.logger(lp); 508 eDest.Say("Copr. 2009, Brian Bockelman, Hdfs Version " XrdHdfsSVNID); 509 510 // Initialize the subsystems 511 // 512 tmp = ((NoGo=Configure(configfn)) ? "failed." : "completed."); 513 eDest.Say("------ HDFS storage system initialization ", tmp); 514 515 // All done. 516 // 517 return NoGo; 518 } 519 476 520 /******************************************************************************/ 477 521 /* g e t V e r s i o n */ XrdHdfs/XrdHdfs.hh
r3552 r3588 129 129 130 130 /******************************************************************************/ 131 /* X r d H d f s */131 /* X r d H d f s S y s */ 132 132 /******************************************************************************/ 133 133 … … 174 174 const char *y=""); 175 175 176 char *N2N_Lib; // -> Name2Name Library Path 177 char *N2N_Parms; // -> Name2Name Object Parameters 178 XrdOucName2Name *the_N2N; // -> File mapper object 179 176 180 XrdHdfsSys() : XrdOss() {} 177 181 virtual ~XrdHdfsSys() {} 178 182 183 private: 184 185 int Configure(const char *); 186 int ConfigN2N(XrdSysError &Eroute); 187 int ConfigProc(XrdSysError &Eroute); 188 int ConfigXeq(char *, XrdOucStream &, XrdSysError &); 189 int xnml(XrdOucStream &Config, XrdSysError &Eroute); 190 179 191 }; 180 192 #endif
