Changeset 3536

Show
Ignore:
Timestamp:
10/13/2009 07:59:24 PM (1 month ago)
Author:
brian
Message:

Modified to be a OSS library.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • XrdHdfs/GNUmakefile

    r3116 r3536  
    6464        $(ECHO)$(CC) $(CFLAGS) $(OBJECTS) $(OBJFS) $(LDSO) $(MORELIBS) $(LIBS) $(HADOOP_LIB) -o $(LIBRARY) 
    6565 
    66 $(OBJDIR)/XrdHdfs.o:  XrdHdfsInterface.hh XrdHdfs.hh  XrdSecInterface.hh
     66$(OBJDIR)/XrdHdfs.o:  XrdHdfs.hh
    6767                           XrdSysError.hh     XrdOucErrInfo.hh XrdSysLogger.hh \ 
    68                            XrdHdfs.cc    XrdHdfsAio.hh  ../XrdVersion.hh 
     68                           XrdHdfs.cc    ../XrdVersion.hh 
    6969        @echo Compiling XrdHdfs.cc  
    7070        $(ECHO)$(CC) -c $(CFLAGS) $(INCLUDE) $(HADOOP_INCLUDE) -o $(OBJDIR)/XrdHdfs.o XrdHdfs.cc 
  • XrdHdfs/XrdHdfs.cc

    r3116 r3536  
    2929#include "XrdSys/XrdSysHeaders.hh" 
    3030#include "XrdSys/XrdSysLogger.hh" 
     31#include "XrdSys/XrdSysPlugin.hh" 
    3132#include "XrdSys/XrdSysPthread.hh" 
    3233#include "XrdSec/XrdSecInterface.hh" 
    33 #include "XrdHdfs/XrdHdfsAio.hh" 
    3434#include "XrdHdfs/XrdHdfs.hh" 
     35#include "XrdOss/XrdOssTrace.hh" 
    3536 
    3637#ifdef AIX 
     
    4748 
    4849/******************************************************************************/ 
    49 /*                        G l o b a l   O b j e c t s                         */ 
    50 /******************************************************************************/ 
    51    
    52 XrdSysError    *XrdHdfs::eDest; 
    53  
    54 /******************************************************************************/ 
    55 /*                           C o n s t r u c t o r                            */ 
    56 /******************************************************************************/ 
    57  
    58 XrdHdfs::XrdHdfs(XrdSysError *ep) 
    59 
    60   eDest = ep; 
    61 
    62    
     50/*                  E r r o r   R o u t i n g   O b j e c t                   */ 
     51/******************************************************************************/ 
     52 
     53namespace XrdHdfs 
     54
     55 
     56XrdSysError OssEroute(0, "hdfs_"); 
     57 
     58XrdOucTrace OssTrace(&OssEroute); 
     59 
     60static XrdHdfsSys XrdHdfsSS; 
     61 
     62
     63 
     64using namespace XrdHdfs; 
     65 
    6366/******************************************************************************/ 
    6467/*                         G e t F i l e S y s t e m                          */ 
    6568/******************************************************************************/ 
    66 XrdSfsFileSystem *XrdSfsGetFileSystem(XrdSfsFileSystem *native_fs,  
    67                                        XrdSysLogger     *lp, 
    68                                        const char *      config) 
    69 
    70  static XrdSysError  Eroute(lp, "XrdHdfs"); 
    71  static XrdHdfs myFS(&Eroute); 
    72  
    73  Eroute.Say("Copr.  2009 University of Nebraska-Lincoln " 
    74                "hdfs plugin v 1.0a"); 
    75  
    76  return &myFS; 
     69extern "C" 
     70
     71XrdOss *XrdOssGetStorageSystem(XrdOss       *native_oss, 
     72                               XrdSysLogger *Logger, 
     73                         const char         *config_fn, 
     74                         const char         *parms) 
     75
     76   return (XrdHdfsSS.Init(Logger, config_fn) ? 0 : (XrdOss *)&XrdHdfsSS); 
     77
    7778} 
    7879 
     
    8182/******************************************************************************/ 
    8283/******************************************************************************/ 
    83 /*                                  o p e n                                   */ 
    84 /******************************************************************************/ 
    85    
    86 int XrdHdfsDirectory::open(const char              *dir_path, // In 
    87                                 const XrdSecClientName  *client,   // In 
    88                                 const char              *info)     // In 
     84/*                                  O p e n d i r                             */ 
     85/******************************************************************************/ 
     86   
     87int XrdHdfsDirectory::Opendir(const char              *dir_path) 
    8988/* 
    9089  Function: Open the directory `path' and prepare for reading. 
    9190 
    9291  Input:    path      - The fully qualified name of the directory to open. 
    93             cred      - Authentication credentials, if any. 
    94             info      - Opaque information, if any. 
    95  
    96   Output:   Returns SFS_OK upon success, otherwise SFS_ERROR. 
    97 */ 
    98 
    99    static const char *epname = "opendir"; 
    100  
    101 // Verify that this object is not already associated with an open directory 
    102 // 
    103      if (dh) return 
    104         XrdHdfs::Emsg(epname, error, EADDRINUSE,  
    105                              "open directory", dir_path); 
     92 
     93  Output:   Returns XrdOssOK upon success, otherwise (-errno). 
     94*/ 
     95
     96#ifndef NODEBUG 
     97   static const char *epname = "Opendir"; 
     98#endif 
     99 
     100// Return an error if we have already opened 
     101   if (isopen) return -XRDOSS_E8001; 
    106102 
    107103// Set up values for this directory object 
     
    112108// Open the directory and get it's id 
    113109// 
    114      if (!(dh = hdfsListDirectory(fs, dir_path, &numEntries))) return 
    115         XrdHdfs::Emsg(epname,error,errno,"open directory",dir_path); 
     110   TRACE(Opendir, "path " << dir_path); 
     111   if (!(dh = hdfsListDirectory(fs, dir_path, &numEntries))) { 
     112      isopen = 0; 
     113      if (errno == 0) 
     114         return -1; 
     115      return -errno; 
     116   } 
     117   isopen = 1; 
    116118 
    117119// All done 
    118120// 
    119    return SFS_OK; 
    120 } 
    121  
    122 /******************************************************************************/ 
    123 /*                             n e x t E n t r y                              */ 
    124 /******************************************************************************/ 
    125  
    126 const char *XrdHdfsDirectory::nextEntry(
     121   return XrdOssOK; 
     122} 
     123 
     124/******************************************************************************/ 
     125/*                             R e a d d i r                                  */ 
     126/******************************************************************************/ 
     127 
     128int XrdHdfsDirectory::Readdir(char * buff, int blen
    127129/* 
    128130  Function: Read the next directory entry. 
     
    136138*/ 
    137139{ 
    138     static const char *epname = "nextEntry"; 
     140#ifndef NODEBUG 
     141    static const char *epname = "Readdir"; 
     142#endif 
     143 
     144  if (!isopen) return -XRDOSS_E8002; 
    139145 
    140146// Lock the direcrtory and do any required tracing 
    141147// 
    142   if (!dh)  
    143       {XrdHdfs::Emsg(epname,error,EBADF,"read directory",fname); 
    144        return (const char *)0; 
    145      
     148  if (!dh)  { 
     149     XrdHdfsSys::Emsg(epname,error,EBADF,"read directory",fname); 
     150     return 0; 
     151 
    146152 
    147153// Check if we are at EOF (once there we stay there) 
    148154// 
    149155   if (dirPos == numEntries-1) 
    150      return (const char *)0; 
     156     return 0; 
    151157 
    152158// Read the next directory entry 
     
    157163// Return the actual entry 
    158164// 
    159    return (const char *)(fileInfo.mName); 
    160 
    161  
    162 /******************************************************************************/ 
    163 /*                                 c l o s e                                  */ 
    164 /******************************************************************************/ 
    165    
    166 int XrdHdfsDirectory::close() 
     165   strlcpy(buff, (const char *)(fileInfo.mName), blen); 
     166   return XrdOssOK; 
     167
     168 
     169/******************************************************************************/ 
     170/*                                 C l o s e                                  */ 
     171/******************************************************************************/ 
     172   
     173int XrdHdfsDirectory::Close(long long *retsz) 
    167174/* 
    168175  Function: Close the directory object. 
     
    170177  Input:    cred       - Authentication credentials, if any. 
    171178 
    172   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    173 */ 
    174 
     179  Output:   Returns XrdOssOK upon success and XRDOSS_E8002 upon failure. 
     180*/ 
     181
     182 
     183   if (!isopen) return -XRDOSS_E8002; 
    175184 
    176185// Release the handle 
    177186// 
    178     if (dh != NULL && numEntries > 0) hdfsFreeFileInfo(dh, numEntries); 
     187   if (dh != NULL && numEntries > 0) 
     188      hdfsFreeFileInfo(dh, numEntries); 
    179189 
    180190// Do some clean-up 
     
    184194   numEntries = 0; 
    185195   dirPos = 0; 
    186    return SFS_OK; 
     196   isopen = 0; 
     197   return 0; 
    187198} 
    188199 
     
    191202/******************************************************************************/ 
    192203/******************************************************************************/ 
    193 /*                                  o p e n                                   */ 
    194 /******************************************************************************/ 
    195  
    196 int XrdHdfsFile::open(const char          *path,      // In 
    197                            XrdSfsFileOpenMode   open_mode, // In 
    198                            mode_t               Mode,      // In 
    199                      const XrdSecClientName    *client,    // In 
    200                      const char                *info)      // In 
    201 /* 
    202   Function: Open the file `path' in the mode indicated by `open_mode'.   
     204/*                                  O p e n                                   */ 
     205/******************************************************************************/ 
     206 
     207int XrdHdfsFile::Open(const char               *path,      // In 
     208                            int                 openMode,  // In 
     209                            mode_t              createMode,// In 
     210                            XrdOucEnv          &client)    // In 
     211/* 
     212  Function: Open the file `path' in the mode indicated by `openMode'.   
    203213 
    204214  Input:    path      - The fully qualified name of the file to open. 
    205             open_mode - One of the following flag values: 
     215            openMode - One of the following flag values: 
    206216                        SFS_O_RDONLY - Open file for reading. 
    207217                        SFS_O_WRONLY - Open file for writing. 
     
    213223                        bits (e.g., 744 == "rwxr--r--"). Mode may also conatin 
    214224                        SFS_O_MKPTH is the full path is to be created. The 
    215                         agument is ignored unless open_mode = SFS_O_CREAT. 
     225                        agument is ignored unless openMode = O_CREAT. 
    216226            client    - Authentication credentials, if any. 
    217227            info      - Opaque information to be used as seen fit. 
    218228 
    219   Output:   Returns OOSS_OK upon success, otherwise SFS_ERROR is returned. 
    220 */ 
    221 
     229  Output:   Returns OOSS_OK upon success, otherwise -errno is returned. 
     230*/ 
     231
     232#ifndef NODEBUG 
    222233   static const char *epname = "open"; 
    223    const int AMode = S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH; // 775 
     234#endif 
     235   //const int AMode = S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH; // 775 
    224236   char *opname; 
    225    int retc, open_flag = 0; 
     237   int open_flag = 0; 
    226238 
    227239// Verify that this object is not already associated with an open file 
    228240// 
    229241   if (fh != NULL) 
    230       return XrdHdfs::Emsg(epname,error,EADDRINUSE,"open file",path)
     242      return -XRDOSS_E8003
    231243   fname = strdup(path); 
    232244 
    233245// Set the actual open mode 
    234246// 
    235    switch(open_mode & (SFS_O_RDONLY | SFS_O_WRONLY | SFS_O_RDWR)) 
     247   switch(openMode & (O_RDONLY | O_WRONLY | O_RDWR)) 
    236248   { 
    237    case SFS_O_RDONLY: open_flag = O_RDONLY; break; 
    238    case SFS_O_WRONLY: open_flag = O_WRONLY; break; 
    239    case SFS_O_RDWR:   open_flag = O_RDWR;   break; 
     249   case O_RDONLY: open_flag = O_RDONLY; break; 
     250   case O_WRONLY: open_flag = O_WRONLY; break; 
     251   case O_RDWR:   open_flag = O_RDWR;   break; 
    240252   default:           open_flag = O_RDONLY; break; 
    241253   } 
    242254 
    243255   // HDFS does not support read-write mode. 
    244    if (open_mode & SFS_O_RDWR) { 
    245        return XrdHdfs::Emsg(epname,error,ENOTSUP, "Read-write mode not" 
     256   if (openMode & O_RDWR) { 
     257       return XrdHdfsSys::Emsg(epname,error,ENOTSUP, "Read-write mode not" 
    246258           " supported by HDFS.",path); 
    247259   } 
     
    249261// Prepare to create or open the file, as needed 
    250262// 
    251    if (open_mode & SFS_O_CREAT) 
    252       { 
     263   if (openMode & O_CREAT) { 
    253264       opname = (char *)"create"; 
    254        if ((Mode & SFS_O_MKPTH) && (retc = XrdHdfs::Mkpath(path,AMode,info))) 
    255           return XrdHdfs::Emsg(epname,error,retc,"create path for",path); 
    256       } else if (open_mode & SFS_O_TRUNC) 
    257                 {open_flag  = O_TRUNC; 
     265   } else if (openMode & O_TRUNC) { 
     266         open_flag  = O_TRUNC; 
    258267                 opname = (char *)"truncate"; 
    259                 } else opname = (char *)"open"; 
     268      } else opname = (char *)"open"; 
    260269 
    261270// Open the file and make sure it is a file 
     
    282291// 
    283292   if (err_code != 0) 
    284        return XrdHdfs::Emsg(epname, error, err_code, opname, path)
    285  
    286    return SFS_OK; 
    287 } 
    288  
    289 /******************************************************************************/ 
    290 /*                                 c l o s e                                  */ 
    291 /******************************************************************************/ 
    292  
    293 int XrdHdfsFile::close(
     293       return -err_code
     294 
     295   return XrdOssOK; 
     296} 
     297 
     298/******************************************************************************/ 
     299/*                                 C l o s e                                  */ 
     300/******************************************************************************/ 
     301 
     302int XrdHdfsFile::Close(long long int *
    294303/* 
    295304  Function: Close the file object. 
     
    297306  Input:    None 
    298307 
    299   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
     308  Output:   Returns XrdOssOK upon success and -errno upon failure. 
    300309*/ 
    301310{ 
     
    305314// 
    306315    if (fh != NULL  && hdfsCloseFile(fs, fh) != 0) 
    307        return XrdHdfs::Emsg(epname, error, errno, "close", fname); 
     316       return XrdHdfsSys::Emsg(epname, error, errno, "close", fname); 
    308317    fh = NULL; 
    309318    if (fname) {free(fname); fname = 0;} 
    310     return SFS_OK; 
    311 
    312  
    313 /******************************************************************************/ 
    314 /*                                  f c t l                                   */ 
    315 /******************************************************************************/ 
    316  
    317 int      XrdHdfsFile::fctl(const int               cmd, 
    318                                 const char             *args, 
    319                                       XrdOucErrInfo    &out_error) 
    320 
    321  
    322 // We don't support this 
    323 // 
    324    out_error.setErrInfo(EEXIST, "fctl operation not supported"); 
    325    return SFS_ERROR; 
    326 
    327    
    328 /******************************************************************************/ 
    329 /*                                  r e a d                                   */ 
    330 /******************************************************************************/ 
    331  
    332 XrdSfsXferSize XrdHdfsFile::read(XrdSfsFileOffset  offset,    // In 
    333                                       char             *buff,      // Out 
    334                                       XrdSfsXferSize    blen)      // In 
     319    return XrdOssOK; 
     320
     321 
     322   
     323/******************************************************************************/ 
     324/*                                  R e a d                                   */ 
     325/******************************************************************************/ 
     326 
     327ssize_t XrdHdfsFile::Read(void   *buff,      // Out 
     328                          off_t   offset,    // In 
     329                          size_t  blen)      // In 
    335330/* 
    336331  Function: Read `blen' bytes at `offset' into 'buff' and return the actual 
     
    342337                        of bytes that will be read from 'fd'. 
    343338 
    344   Output:   Returns the number of bytes read upon success and SFS_ERROR o/w. 
    345 */ 
    346 
    347    static const char *epname = "read"; 
    348    XrdSfsXferSize nbytes; 
    349  
    350 // Make sure the offset is not too large 
    351 // 
    352 #if _FILE_OFFSET_BITS!=64 
    353    if (offset >  0x000000007fffffff) 
    354       return XrdHdfs::Emsg(epname, error, EFBIG, "read", fname); 
    355 #endif 
     339  Output:   Returns the number of bytes read upon success and -errno o/w. 
     340*/ 
     341
     342#ifndef NODEBUG 
     343   static const char *epname = "Read"; 
     344#endif 
     345   size_t nbytes; 
    356346 
    357347// Read the actual number of bytes 
     
    360350 
    361351   if (nbytes  < 0) 
    362       return XrdHdfs::Emsg(epname, error, errno, "read", fname); 
     352      return XrdHdfsSys::Emsg(epname, error, errno, "read", fname); 
    363353 
    364354// Return number of bytes read 
     
    368358   
    369359/******************************************************************************/ 
    370 /*                              r e a d   A I O                               */ 
    371 /******************************************************************************/ 
    372    
    373 int XrdHdfsFile::read(XrdSfsAio *aiop) 
     360/*                              R e a d   A I O                               */ 
     361/******************************************************************************/ 
     362   
     363int XrdHdfsFile::Read(XrdSfsAio *aiop) 
    374364{ 
    375365 
    376366// Execute this request in a synchronous fashion 
    377367// 
    378    aiop->Result = this->read((XrdSfsFileOffset)aiop->sfsAio.aio_offset, 
    379                                        (char *)aiop->sfsAio.aio_buf, 
    380                                (XrdSfsXferSize)aiop->sfsAio.aio_nbytes); 
     368   aiop->Result = this->Read((void *)aiop->sfsAio.aio_buf, aiop->sfsAio.aio_offset, 
     369                             aiop->sfsAio.aio_nbytes); 
    381370   aiop->doneRead(); 
    382371   return 0; 
     
    384373 
    385374/******************************************************************************/ 
    386 /*                                 w r i t e                                  */ 
    387 /******************************************************************************/ 
    388  
    389 XrdSfsXferSize XrdHdfsFile::write(XrdSfsFileOffset   offset,    // In 
    390                                        const char        *buff,      // In 
    391                                        XrdSfsXferSize     blen)      // In 
     375/*                                 W r i t e                                  */ 
     376/******************************************************************************/ 
     377 
     378ssize_t XrdHdfsFile::Write(const char *buff,    // In 
     379                                 off_t offset,  // In 
     380                                 size_t blen)   // In 
    392381/* 
    393382  Function: Write `blen' bytes at `offset' from 'buff' and return the actual 
     
    399388                        of bytes that will be written to 'fd'. 
    400389 
    401   Output:   Returns the number of bytes written upon success and SFS_ERROR o/w. 
     390  Output:   Returns the number of bytes written upon success and -errno o/w. 
    402391 
    403392  Notes:    An error return may be delayed until the next write(), close(), or 
     
    414403#if _FILE_OFFSET_BITS!=64 
    415404   if (offset >  0x000000007fffffff) 
    416       return XrdHdfs::Emsg(epname, error, EFBIG, "write", fname); 
    417 #endif 
    418  
    419    return XrdHdfs::Emsg(epname,error,ENOTSUP, "Write mode not" 
     405      return XrdHdfsSys::Emsg(epname, error, EFBIG, "write", fname); 
     406#endif 
     407 
     408   return XrdHdfsSys::Emsg(epname,error,ENOTSUP, "Write mode not" 
    420409      " supported by HDFS.",fname); 
    421410 
     
    423412 
    424413/******************************************************************************/ 
    425 /*                             w r i t e   A I O                              */ 
    426 /******************************************************************************/ 
    427    
    428 int XrdHdfsFile::write(XrdSfsAio *aiop) 
     414/*                             W r i t e   A I O                              */ 
     415/******************************************************************************/ 
     416   
     417int XrdHdfsFile::Write(XrdSfsAio *aiop) 
    429418{ 
    430419 
    431420// Execute this request in a synchronous fashion 
    432421// 
    433    aiop->Result = this->write((XrdSfsFileOffset)aiop->sfsAio.aio_offset, 
    434                                         (char *)aiop->sfsAio.aio_buf, 
    435                                 (XrdSfsXferSize)aiop->sfsAio.aio_nbytes); 
     422   aiop->Result = this->Write((const char *)aiop->sfsAio.aio_buf, aiop->sfsAio.aio_offset, 
     423                              aiop->sfsAio.aio_nbytes); 
    436424   aiop->doneWrite(); 
    437425   return 0; 
     
    439427   
    440428/******************************************************************************/ 
    441 /*                                s t a t                                   */ 
    442 /******************************************************************************/ 
    443  
    444 int XrdHdfsFile::stat(struct stat     *buf)         // Out 
     429/*                                F s t a t                                   */ 
     430/******************************************************************************/ 
     431 
     432int XrdHdfsFile::Fstat(struct stat     *buf)         // Out 
    445433/* 
    446434  Function: Return file status information 
     
    448436  Input:    buf         - The stat structiure to hold the results 
    449437 
    450   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
     438  Output:   Returns XrdOssOK upon success and -errno upon failure. 
    451439*/ 
    452440{ 
     
    457445// 
    458446   if (fileInfo == NULL) 
    459       return XrdHdfs::Emsg(epname, error, errno, "state", fname); 
     447      return XrdHdfsSys::Emsg(epname, error, errno, "state", fname); 
    460448 
    461449   buf->st_mode = (fileInfo->mKind == kObjectKindDirectory) ? (S_IFDIR | 0777):\ 
     
    476464// All went well 
    477465// 
    478    return SFS_OK; 
    479 
    480  
    481 /******************************************************************************/ 
    482 /*                                  s y n c                                   */ 
    483 /******************************************************************************/ 
    484  
    485 int XrdHdfsFile::sync() 
    486 /* 
    487   Function: Commit all unwritten bytes to physical media. 
    488  
    489   Input:    None 
    490  
    491   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    492 */ 
    493 
    494    static const char *epname = "sync"; 
    495  
    496    return XrdHdfs::Emsg(epname,error,ENOTSUP, "Write mode not" 
    497       " supported by HDFS.",fname); 
    498  
    499 // All done 
    500 // 
    501    return SFS_OK; 
    502 
    503  
    504 /******************************************************************************/ 
    505 /*                              s y n c   A I O                               */ 
    506 /******************************************************************************/ 
    507    
    508 int XrdHdfsFile::sync(XrdSfsAio *aiop) 
    509 
    510  
    511 // Execute this request in a synchronous fashion 
    512 // 
    513    aiop->Result = this->sync(); 
    514    aiop->doneWrite(); 
    515    return 0; 
    516 
    517  
    518 /******************************************************************************/ 
    519 /*                              t r u n c a t e                               */ 
    520 /******************************************************************************/ 
    521  
    522 int XrdHdfsFile::truncate(XrdSfsFileOffset  flen)  // In 
    523 /* 
    524   Function: Set the length of the file object to 'flen' bytes. 
    525  
    526   Input:    flen      - The new size of the file. 
    527  
    528   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    529  
    530   Notes:    If 'flen' is smaller than the current size of the file, the file 
    531             is made smaller and the data past 'flen' is discarded. If 'flen' 
    532             is larger than the current size of the file, a hole is created 
    533             (i.e., the file is logically extended by filling the extra bytes  
    534             with zeroes). 
    535 */ 
    536 
    537    static const char *epname = "trunc"; 
    538  
    539 // Make sure the offset is not too larg 
    540 // 
    541    if (sizeof(off_t) < sizeof(flen) && flen >  0x000000007fffffff) 
    542       return XrdHdfs::Emsg(epname, error, EFBIG, "truncate", fname); 
    543  
    544 // Perform the function 
    545 // 
    546    return XrdHdfs::Emsg(epname,error,ENOTSUP, "Truncate not" 
    547       " supported by HDFS.",fname); 
    548  
    549 // All done 
    550 // 
    551    return SFS_OK; 
     466   return XrdOssOK; 
    552467} 
    553468 
     
    555470/*         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          */ 
    556471/******************************************************************************/ 
    557 /******************************************************************************/ 
    558 /*                                 c h m o d                                  */ 
    559 /******************************************************************************/ 
    560  
    561 int XrdHdfs::chmod(const char             *path,    // In 
    562                               XrdSfsMode        Mode,    // In 
    563                               XrdOucErrInfo    &error,   // Out 
    564                         const XrdSecClientName *client,  // In 
    565                         const char             *info)    // In 
    566 /* 
    567   Function: Change the mode on a file or directory. 
    568  
    569   Input:    path      - Is the fully qualified name of the file to be removed. 
    570             einfo     - Error information object to hold error details. 
    571             client    - Authentication credentials, if any. 
    572             info      - Opaque information, if any. 
    573  
    574   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    575 */ 
    576 { 
    577    static const char *epname = "chmod"; 
    578    mode_t acc_mode = Mode & S_IAMB; 
    579  
    580    const char * groups[1] = {client->grps}; 
    581    hdfsFS fs = hdfsConnectAsUser("default", 0, client->name, groups, 1); 
    582        
    583 // Perform the actual deletion 
    584 // 
    585    if (hdfsChmod(fs, path, acc_mode) ) 
    586       return XrdHdfs::Emsg(epname,error,errno,"change mode on",path); 
    587  
    588 // All done 
    589 // 
    590     return SFS_OK; 
    591 } 
    592    
    593 /******************************************************************************/ 
    594 /*                                e x i s t s                                 */ 
    595 /******************************************************************************/ 
    596  
    597 int XrdHdfs::exists(const char                *path,        // In 
    598                                XrdSfsFileExistence &file_exists, // Out 
    599                                XrdOucErrInfo       &error,       // Out 
    600                          const XrdSecClientName    *client,      // In 
    601                          const char                *info)        // In 
    602 /* 
    603   Function: Determine if file 'path' actually exists. 
    604  
    605   Input:    path        - Is the fully qualified name of the file to be tested. 
    606             file_exists - Is the address of the variable to hold the status of 
    607                           'path' when success is returned. The values may be: 
    608                           XrdSfsFileExistsIsDirectory - file not found but path is valid. 
    609                           XrdSfsFileExistsIsFile      - file found. 
    610                           XrdSfsFileExistsIsNo        - neither file nor directory. 
    611             einfo       - Error information object holding the details. 
    612             client      - Authentication credentials, if any. 
    613             info        - Opaque information, if any. 
    614  
    615   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    616  
    617   Notes:    When failure occurs, 'file_exists' is not modified. 
    618 */ 
    619 { 
    620    static const char *epname = "exists"; 
    621  
    622 // Now try to find the file or directory 
    623 // 
    624  
    625    const char * groups[1] = {client->grps}; 
    626    hdfsFS fs = hdfsConnectAsUser("default", 0, client->name, groups, 1); 
    627  
    628    hdfsFileInfo * fileInfo = hdfsGetPathInfo(fs, path); 
    629  
    630    if (fileInfo == NULL) 
    631        return XrdHdfs::Emsg(epname, error, errno, "locate", path); 
    632  
    633    if (fileInfo->mKind == kObjectKindDirectory) 
    634       file_exists = XrdSfsFileExistIsDirectory; 
    635    else if (fileInfo->mKind == kObjectKindFile) 
    636       file_exists = XrdSfsFileExistIsFile; 
    637    else 
    638       file_exists = XrdSfsFileExistNo; 
    639  
    640    hdfsFreeFileInfo(fileInfo, 1); 
    641  
    642    return SFS_OK; 
    643 } 
    644  
    645 /******************************************************************************/ 
    646 /*                                 f s c t l                                  */ 
    647 /******************************************************************************/ 
    648  
    649 int XrdHdfs::fsctl(const int               cmd, 
    650                         const char             *args, 
    651                               XrdOucErrInfo    &out_error, 
    652                         const XrdSecClientName *client) 
    653 { 
    654     out_error.setErrInfo(ENOTSUP, "Operation not supported."); 
    655     return SFS_ERROR; 
    656 } 
    657472   
    658473/******************************************************************************/ 
     
    660475/******************************************************************************/ 
    661476 
    662 const char *XrdHdfs::getVersion() {return XrdVERSION;} 
    663  
    664 /******************************************************************************/ 
    665 /*                                 m k d i r                                  */ 
    666 /******************************************************************************/ 
    667  
    668 int XrdHdfs::mkdir(const char             *path,    // In 
    669                               XrdSfsMode        Mode,    // In 
    670                               XrdOucErrInfo    &error,   // Out 
    671                         const XrdSecClientName *client,  // In 
    672                         const char             *info)    // In 
    673 /* 
    674   Function: Create a directory entry. 
    675  
    676   Input:    path      - Is the fully qualified name of the file to be removed. 
    677             Mode      - Is the POSIX mode setting for the directory. If the 
    678                         mode contains SFS_O_MKPTH, the full path is created. 
    679             einfo     - Error information object to hold error details. 
    680             client    - Authentication credentials, if any. 
    681             info      - Opaque information, if any. 
    682  
    683   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    684 */ 
    685 
    686    static const char *epname = "mkdir"; 
    687    mode_t acc_mode = Mode & S_IAMB; 
    688  
    689    const char * groups[1] = {client->grps}; 
    690    hdfsFS fs = hdfsConnectAsUser("default", 0, client->name, groups, 1); 
    691  
    692 // Create the path if it does not already exist 
    693 // 
    694    if (Mode & SFS_O_MKPTH) Mkpath(path, acc_mode, info); 
    695  
    696 // Perform the actual deletion 
    697 // 
    698    if (hdfsCreateDirectory(fs, path) == -1) 
    699       return XrdHdfs::Emsg(epname,error,errno,"create directory",path); 
    700  
    701 // All done 
    702 // 
    703     return SFS_OK; 
    704 
    705  
    706 /******************************************************************************/ 
    707 /*                                M k p a t h                                 */ 
    708 /******************************************************************************/ 
    709 /* 
    710   Function: Create a directory path 
    711  
    712   Input:    path        - Is the fully qualified name of the new path. 
    713             mode        - The new mode that each new directory is to have. 
    714             info        - Opaque information, of any. 
    715  
    716   Output:   Returns 0 upon success and -errno upon failure. 
    717 */ 
    718  
    719 int XrdHdfs::Mkpath(const char *path, mode_t mode, const char *info) 
    720 
    721  
    722    return -ENOTSUP; 
    723  
    724 
    725  
    726 /******************************************************************************/ 
    727 /*                                   r e m                                    */ 
    728 /******************************************************************************/ 
    729    
    730 int XrdHdfs::rem(const char             *path,    // In 
    731                             XrdOucErrInfo    &error,   // Out 
    732                       const XrdSecClientName *client,  // In 
    733                       const char             *info)    // In 
    734 /* 
    735   Function: Delete a file from the namespace. 
    736  
    737   Input:    path      - Is the fully qualified name of the file to be removed. 
    738             einfo     - Error information object to hold error details. 
    739             client    - Authentication credentials, if any. 
    740             info      - Opaque information, if any. 
    741  
    742   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    743 */ 
    744 
    745    static const char *epname = "rem"; 
    746    const char * groups[1] = {client->grps}; 
    747    hdfsFS fs = hdfsConnectAsUser("default", 0, client->name, groups, 1); 
    748  
    749 // Perform the actual deletion 
    750 // 
    751     if (hdfsDelete(fs, path) == -1) 
    752        return XrdHdfs::Emsg(epname, error, errno, "remove", path); 
    753  
    754 // All done 
    755 // 
    756     return SFS_OK; 
    757 
    758  
    759 /******************************************************************************/ 
    760 /*                                r e m d i r                                 */ 
    761 /******************************************************************************/ 
    762  
    763 int XrdHdfs::remdir(const char             *path,    // In 
    764                                XrdOucErrInfo    &error,   // Out 
    765                          const XrdSecClientName *client,  // In 
    766                          const char             *info)    // In 
    767 /* 
    768   Function: Delete a directory from the namespace. 
    769  
    770   Input:    path      - Is the fully qualified name of the dir to be removed. 
    771             einfo     - Error information object to hold error details. 
    772             client    - Authentication credentials, if any. 
    773             info      - Opaque information, if any. 
    774  
    775   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    776 */ 
    777 
    778    static const char *epname = "remdir"; 
    779    const char * groups[1] = {client->grps}; 
    780    hdfsFS fs = hdfsConnectAsUser("default", 0, client->name, groups, 1); 
    781  
    782 // Perform the actual deletion 
    783 // 
    784     if (hdfsDelete(fs, path) == -1) 
    785        return XrdHdfs::Emsg(epname, error, errno, "remove", path); 
    786  
    787 // All done 
    788 // 
    789     return SFS_OK; 
    790 
    791  
    792 /******************************************************************************/ 
    793 /*                                r e n a m e                                 */ 
    794 /******************************************************************************/ 
    795  
    796 int XrdHdfs::rename(const char             *old_name,  // In 
    797                          const char             *new_name,  // In 
    798                                XrdOucErrInfo    &error,     //Out 
    799                          const XrdSecClientName *client,    // In 
    800                          const char             *infoO,     // In 
    801                          const char             *infoN)     // In 
    802 /* 
    803   Function: Renames a file/directory with name 'old_name' to 'new_name'. 
    804  
    805   Input:    old_name  - Is the fully qualified name of the file to be renamed. 
    806             new_name  - Is the fully qualified name that the file is to have. 
    807             error     - Error information structure, if an error occurs. 
    808             client    - Authentication credentials, if any. 
    809             info      - old_name opaque information, if any. 
    810             info      - new_name opaque information, if any. 
    811  
    812   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    813 */ 
    814 
    815    static const char *epname = "rename"; 
    816    const char * groups[1] = {client->grps}; 
    817    hdfsFS fs = hdfsConnectAsUser("default", 0, client->name, groups, 1); 
    818  
    819 // Perform actual rename operation 
    820 // 
    821    if (hdfsRename(fs, old_name, new_name) == -1) 
    822       return XrdHdfs::Emsg(epname, error, errno, "rename", old_name); 
    823  
    824 // All done 
    825 // 
    826    return SFS_OK; 
    827 
    828    
    829 /******************************************************************************/ 
    830 /*                                  s t a t                                   */ 
    831 /******************************************************************************/ 
    832  
    833 int XrdHdfs::stat(const char              *path,        // In 
    834                              struct stat       *buf,         // Out 
    835                              XrdOucErrInfo     &error,       // Out 
    836                        const XrdSecClientName  *client,      // In 
    837                        const char              *info)        // In 
     477const char *XrdHdfsSys::getVersion() {return XrdVERSION;} 
     478 
     479/******************************************************************************/ 
     480/*                                  S t a t                                   */ 
     481/******************************************************************************/ 
     482 
     483int XrdHdfsSys::Stat(const char              *path,        // In 
     484                        struct stat       *buf,         // Out 
     485                        int                )            // In 
    838486/* 
    839487  Function: Get info on 'path'. 
     
    845493            info        - Opaque information, if any. 
    846494 
    847   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
     495  Output:   Returns XrdOssOK upon success and -errno upon failure. 
    848496*/ 
    849497{ 
    850498   static const char *epname = "stat"; 
    851    const char * groups[1] = {client->grps}; 
    852    hdfsFS fs = hdfsConnectAsUser("default", 0, client->name, groups, 1); 
     499   const char * groups[1] = {"nobody"}; 
     500   hdfsFS fs = hdfsConnectAsUser("default", 0, "nobody", groups, 1); 
    853501 
    854502   hdfsFileInfo * fileInfo = hdfsGetPathInfo(fs, path); 
     
    857505// 
    858506   if (fileInfo == NULL) 
    859       return XrdHdfs::Emsg(epname, error, errno, "state", path); 
     507      return XrdHdfsSys::Emsg(epname, error, errno, "state", path); 
    860508 
    861509   buf->st_mode = (fileInfo->mKind == kObjectKindDirectory) ? (S_IFDIR | 0777):\ 
     
    876524// All went well 
    877525// 
    878    return SFS_OK; 
    879 
    880  
    881 /******************************************************************************/ 
    882 /*                              t r u n c a t e                               */ 
    883 /******************************************************************************/ 
    884    
    885 int XrdHdfs::truncate(const char             *path,    // In 
    886                                  XrdSfsFileOffset  flen,    // In 
    887                                  XrdOucErrInfo    &error,   // Out 
    888                            const XrdSecClientName *client,  // In 
    889                            const char             *info)    // In 
    890 /* 
    891   Function: Set the length of the file object to 'flen' bytes. 
    892  
    893   Input:    path      - The path to the file. 
    894             flen      - The new size of the file. 
    895             einfo     - Error information object to hold error details. 
    896             client    - Authentication credentials, if any. 
    897             info      - Opaque information, if any. 
    898  
    899   Output:   Returns SFS_OK upon success and SFS_ERROR upon failure. 
    900  
    901   Notes:    If 'flen' is smaller than the current size of the file, the file 
    902             is made smaller and the data past 'flen' is discarded. If 'flen' 
    903             is larger than the current size of the file, a hole is created 
    904             (i.e., the file is logically extended by filling the extra bytes  
    905             with zeroes). 
    906 */ 
    907 
    908    static const char *epname = "trunc"; 
    909  
    910    return XrdHdfs::Emsg(epname,error,ENOTSUP, "Truncate not" 
    911       " supported by HDFS.",path); 
    912 
     526   return XrdOssOK; 
     527
     528 
    913529 
    914530/******************************************************************************/ 
     
    916532/******************************************************************************/ 
    917533 
    918 int XrdHdfs::Emsg(const char    *pfx,    // Message prefix value 
     534int XrdHdfsSys::Emsg(const char    *pfx,    // Message prefix value 
    919535                       XrdOucErrInfo &einfo,  // Place to put text & error code 
    920536                       int            ecode,  // The error code 
     
    937553// 
    938554#ifndef NODEBUG 
    939    eDest->Emsg(pfx, buffer); 
     555   OssEroute.Emsg(pfx, buffer); 
    940556#endif 
    941557 
     
    944560    einfo.setErrInfo(ecode, buffer); 
    945561 
    946     return SFS_ERROR; 
    947 
     562    if (errno != 0) 
     563       return -errno; 
     564    return -1; 
     565
  • XrdHdfs/XrdHdfs.hh

    r3116 r3536  
    1616#include <string.h> 
    1717#include <dirent.h> 
    18    
    19 #include "XrdSfs/XrdSfsInterface.hh" 
     18  
     19#include "XrdOuc/XrdOucErrInfo.hh" 
     20  
     21#include "XrdOss/XrdOssApi.hh" 
     22#include "XrdSfs/XrdSfsAio.hh" 
    2023 
    2124#include "hdfs.h" 
    2225 
    23 class XrdSysError
     26class XrdSfsAio
    2427class XrdSysLogger; 
    2528 
     
    2831/******************************************************************************/ 
    2932   
    30 class XrdHdfsDirectory : public XrdSfsDirectory 
     33class XrdHdfsDirectory : public XrdOssDF 
    3134{ 
    3235public: 
     36        XrdOucErrInfo  error; 
    3337 
    34         int         open(const char              *dirName, 
    35                          const XrdSecClientName  *client = 0, 
    36                          const char              *opaque = 0); 
     38        int         Opendir(const char *dirName); 
     39        int         Readdir(char *buff, int blen); 
     40        int         Close(long long *retsz=0); 
    3741 
    38         const char *nextEntry(); 
    39  
    40         int         close(); 
    41  
    42 const   char       *FName() {return (const char *)fname;} 
    43  
    44                     XrdHdfsDirectory(char *user=0) : XrdSfsDirectory(user) 
     42                    XrdHdfsDirectory(const char *tid=0) : XrdOssDF() 
    4543                                { 
    4644                                 const char * groups[1] = {"nobody"}; 
    47                                  fs = hdfsConnectAsUser("default", 0, user
     45                                 fs = hdfsConnectAsUser("default", 0, tid
    4846                                    groups, 1); 
    4947                                 dh  = (hdfsFileInfo*)NULL; 
     
    6058int            dirPos; 
    6159char          *fname; 
     60const char    *tident; 
     61int  isopen; 
    6262 
    6363}; 
     
    6767/******************************************************************************/ 
    6868   
    69 class XrdHdfsFile : public XrdSfsFile 
     69class XrdHdfsFile : public XrdOssDF 
    7070{ 
    7171public: 
    7272 
    73         int            open(const char                *fileName, 
    74                                   XrdSfsFileOpenMode   openMode, 
     73        XrdOucErrInfo  error; 
     74 
     75        int            Open(const char                *fileName, 
     76                                  int                  openMode, 
    7577                                  mode_t               createMode, 
    76                             const XrdSecClientName    *client = 0, 
    77                             const char                *opaque = 0); 
     78                                  XrdOucEnv           &client); 
    7879 
    79         int            close(); 
     80        int            Close(long long *retsz=0); 
    8081 
    81         int            fctl(const int               cmd, 
    82                             const char             *args, 
    83                                   XrdOucErrInfo    &out_error); 
     82        int            Fstat(struct stat *); 
    8483 
    85         const char    *FName() {return fname;} 
     84        int            Fsync() {return -ENOTSUP;} 
    8685 
    87         int            getMmap(void **Addr, off_t &Size) 
    88                               {if (Addr) Addr = 0; Size = 0; return SFS_OK;} 
     86        int            Fsync(XrdSfsAio *a) {return -ENOTSUP;} 
    8987 
    90         int            read(XrdSfsFileOffset   fileOffset, 
    91                             XrdSfsXferSize     preread_sz) {return SFS_OK;} 
     88        off_t          getMmap(void **Addr) 
     89                              {*Addr = 0; return 0;} 
    9290 
    93         XrdSfsXferSize read(XrdSfsFileOffset   fileOffset, 
    94                             char              *buffer, 
    95                             XrdSfsXferSize     buffer_size); 
     91        ssize_t        Read(off_t               fileOffset, 
     92                            size_t              preread_sz) {return XrdOssOK;} 
    9693 
    97         int            read(XrdSfsAio *aioparm); 
     94        ssize_t        Read(void               *buffer, 
     95                            off_t               fileOffset, 
     96                            size_t              buffer_size); 
    9897 
    99         XrdSfsXferSize write(XrdSfsFileOffset   fileOffset, 
    100                              const char        *buffer, 
    101                              XrdSfsXferSize     buffer_size); 
     98        int            Read(XrdSfsAio *aioparm); 
    10299 
    103         int            write(XrdSfsAio *aioparm); 
     100        ssize_t        ReadRaw(void            *buffer, 
     101                            off_t               fileOffset, 
     102                            size_t              buffer_size) {return Read(buffer, fileOffset, buffer_size);} 
    104103 
    105         int            sync(); 
     104        ssize_t        Write(const char        *buffer, 
     105                             off_t              fileOffset, 
     106                             size_t             buffer_size); 
    106107 
    107         int            sync(XrdSfsAio *aiop); 
     108        int            Write(XrdSfsAio *aioparm); 
    108109 
    109         int            stat(struct stat *buf); 
     110        int            Ftruncate(unsigned long long) {return -ENOTSUP;} 
    110111 
    111         int            truncate(XrdSfsFileOffset   fileOffset); 
    112  
    113         int            getCXinfo(char cxtype[4], int &cxrsz) {return cxrsz = 0;} 
    114  
    115                        XrdHdfsFile(char *user=0) : XrdSfsFile(user) 
     112                       XrdHdfsFile(const char *user=0) : XrdOssDF() 
    116113                                          { 
    117114                                           const char * groups[1] = {"nobody"}; 
     
    134131/******************************************************************************/ 
    135132   
    136 class XrdHdfs : public XrdSfsFileSystem 
     133class XrdHdfsSys : public XrdOss 
    137134{ 
    138135public: 
     136        XrdOucErrInfo  error; 
    139137 
    140138// Object Allocation Functions 
    141139// 
    142         XrdSfsDirectory *newDir(char *user=0) 
    143                         {return (XrdSfsDirectory *)new XrdHdfsDirectory(user);} 
     140        XrdOssDF        *newDir(const char *user=0) 
     141                        {return (XrdHdfsDirectory *)new XrdHdfsDirectory(user);} 
    144142 
    145         XrdSfsFile      *newFile(char *user=0) 
    146                         {return      (XrdSfsFile *)new XrdHdfsFile(user);} 
     143        XrdOssDF        *newFile(const char *user=0) 
     144                        {return      (XrdHdfsFile *)new XrdHdfsFile(user);} 
    147145 
    148146// Other Functions 
    149147// 
    150         int            chmod(const char             *Name, 
    151                                    XrdSfsMode        Mode, 
    152                                    XrdOucErrInfo    &out_error, 
    153                              const XrdSecClientName *client = 0, 
    154                              const char             *opaque = 0); 
     148        int            Chmod(const char *, mode_t) {return -ENOTSUP;} 
    155149 
    156         int            exists(const char                *fileName, 
    157                                     XrdSfsFileExistence &exists_flag, 
    158                                     XrdOucErrInfo       &out_error, 
    159                               const XrdSecClientName    *client = 0, 
    160                               const char                *opaque = 0); 
     150        int            Create(const char *, const char *, mode_t, XrdOucEnv &, int opts=0) {return -ENOTSUP;} 
    161151 
    162         int            fsctl(const int               cmd, 
    163                              const char             *args, 
    164                                    XrdOucErrInfo    &out_error, 
    165                              const XrdSecClientName *client = 0); 
     152        int            Init(XrdSysLogger *, const char *) {return 0;} 
    166153 
    167154        int            getStats(char *buff, int blen) {return 0;} 
     
    169156const   char          *getVersion(); 
    170157 
    171         int            mkdir(const char             *dirName, 
    172                                    XrdSfsMode        Mode, 
    173                                    XrdOucErrInfo    &out_error, 
    174                              const XrdSecClientName *client = 0, 
    175                              const char             *opaque = 0); 
     158        int            Mkdir(const char *, mode_t, int) {return -ENOTSUP;} 
    176159 
    177         int            prepare(      XrdSfsPrep       &pargs, 
    178                                      XrdOucErrInfo    &out_error, 
    179                                const XrdSecClientName *client = 0) {return 0;} 
     160        int            Remdir(const char *) {return -ENOTSUP;} 
    180161 
    181         int            rem(const char             *path, 
    182                                  XrdOucErrInfo    &out_error, 
    183                            const XrdSecClientName *client = 0, 
    184                            const char             *opaque = 0); 
     162        int            Rename(const char *, const char *) {return -ENOTSUP;} 
    185163 
    186         int            remdir(const char             *dirName, 
    187                                     XrdOucErrInfo    &out_error, 
    188                               const XrdSecClientName *client = 0, 
    189                               const char             *opaque = 0); 
     164        int            Stat(const char *, struct stat *, int resonly=0); 
    190165 
    191         int            rename(const char             *oldFileName, 
    192                               const char             *newFileName, 
    193                                     XrdOucErrInfo    &out_error, 
    194                               const XrdSecClientName *client = 0, 
    195                               const char             *opaqueO = 0, 
    196                               const char             *opaqueN = 0); 
     166        int            Truncate(const char *, unsigned long long) {return -ENOTSUP;} 
    197167 
    198         int            stat(const char             *Name, 
    199                                   struct stat      *buf, 
    200                                   XrdOucErrInfo    &out_error, 
    201                             const XrdSecClientName *client = 0, 
    202                             const char             *opaque = 0); 
    203  
    204         int            stat(const char             *Name, 
    205                                   mode_t           &mode, 
    206                                   XrdOucErrInfo    &out_error, 
    207                             const XrdSecClientName *client = 0, 
    208                             const char             *opaque = 0) 
    209                        {struct stat bfr; 
    210                         int rc = stat(Name, &bfr, out_error, client); 
    211                         if (!rc) mode = bfr.st_mode; 
    212                         return rc; 
    213                        } 
    214  
    215         int            truncate(const char             *Name, 
    216                                       XrdSfsFileOffset fileOffset, 
    217                                       XrdOucErrInfo    &out_error, 
    218                                 const XrdSecEntity     *client = 0, 
    219                                 const char             *opaque = 0); 
    220  
    221 // Common functions 
    222 // 
    223 static  int            Mkpath(const char *path, mode_t mode,  
    224                               const char *info=0); 
     168        int            Unlink(const char *) {return -ENOTSUP;} 
    225169 
    226170static  int            Emsg(const char *, XrdOucErrInfo&, int, const char *x, 
    227171                            const char *y=""); 
    228172 
    229                        XrdHdfs(XrdSysError *lp); 
    230 virtual               ~XrdHdfs() {} 
    231  
    232 private: 
    233  
    234 static XrdSysError *eDest; 
     173XrdHdfsSys() : XrdOss() {} 
     174virtual ~XrdHdfsSys() {} 
    235175 
    236176};