Download presentation
Presentation is loading. Please wait.
Published bySade Biron Modified over 9 years ago
1
Alejandro Alvarez Ayllon on behalf of the DM Clients developers GFAL/LCGUTIL to GFAL2/GFAL2 migration
2
2 Remember remember the 1 st of November
3
The 1 st of November GFAL/LCGUTIL will not be supported They will be removed from Fedora/EPEL Fear not! We will give support for migration indefinitely 3
4
Release cycle for gfal2 components 4 EPEL Full production release Development Increase of minor version New functionalities Non critical bug fixes Nightly tests Deployed in the FTS3 Development Services RC Increase of revision number Critical bug fixes Deployed in the FTS3 Pilot Service EPEL Testing Increase of release number “Quarantine” stage of a release Packaging fixes Critical patches Beta testers welcome! Merges
5
5 Getting started
6
Installation Enable EPEL (5, 6 or even 7!) Install gfal2-all Core + Transfer, DCAP, GridFTP, HTTP/DAV, LFC, RFIO and SRM gfal2-python gfal2-util gfal2-plugin-xrootd for xrootd support 6
7
Fast check $ voms-proxy-init --voms dteam $ gfal-ls gsiftp://lxfsra04a04.cern.ch/dpm/ drwxr-xr-x 0 0 0 Jul 12 2013 0 cern.ch 7
8
8 Command Line Interface Side by side
9
Descriptionlcg-utilgfal2-util Add an alias for a given GUIDlcg-aaDeprecated Bring SURLS onlinelcg-bringonlineN/A, can be done Copy files with no cataloglcg-cpgfal-copy Copy file and registerlcg-crgfal-copy Delete a file / directorylcg-delgfal-rm Get checksumlcg-get-checksumgfal-checksum Get TURL/slcg-getturlsgfal-xattr List aliases for a given GUIDlcg-laDeprecated Get the GUID for an LFNlcg-lcgfal-xattr List the replicas for an LFNlcg-lggfal-xattr Directory listinglcg-lsgfal-ls Remove an aliaslcg-raDeprecated 9
10
Descriptionlcg-utilgfal2-util Copy between SEs with registrationlcg-repgfal-copy Register a file in the cataloglcg-rfgfal-copy Set a file status to donelcg-sdDeprecated Get space tokenslcg-stmdgfal-xattr Unregister a filelcg-ufDeprecated Create a directorygfal-mkdir Dump stdin into a filegfal-save Dump a file into stdoutgfal-cat 10
11
Two Swiss Army Knifes: gfal-copy LFC is not a special citizen, but some operations can be mapped easily Registration = COPY 11
12
# Copy & Register (lcg-cr) gfal-copy file:///local/file gsiftp://se.cern.ch \ lfc://lfc.cern.ch/lfn # Copy & Register (lcg-rep) gfal-copy gsiftp://se-a/path gsiftp://se-b/path lfc://lfc.cern.ch/lfn # Register a file (lcg-rf) gfal-copy gsiftp://se/path lfc://lfc.cern.ch/lfn 12
13
Two Swiss Army Knifes: gfal-xattr Get/set extended attributes: key => value Some “special” mappings user.replicas user.guid user.comment spacetoken spacetoken.token? spacetoken.description? 13
14
14 Examples
15
15 GFAL2 Python API Side by side
16
GFAL: Less Pythonic import gfal gfalDict = {‘surls’: ‘srm://…’} err, obj, msg = gfal.gfal_init(gfalDict) ret, buff, msg = gfal.gfal_ls(obj) gfal.internal_free(obj) 16
17
GFAL2: More Pythonic 17 import gfal2 ctx = gfal2.creat_context() try: ctx.listdir(‘srm://…’) except gfal2.Gerror, e: print “[%d] %s” % (e.code, e.message)
18
Descriptiongfalgfal2 List a directorygfal_lsctx.listdir ctx.opendir + read/readpp Extend lifetimegfal_pinNot available Async bring onlinegfal_prestagectx.bring_online TURLS from SURLSgfal_turlsfromsurlsctx.getaxttr Delete SURLSgfal_deletesurlsctx.unlink Delete directorygfal_removedirctx.rmdir Status of async bring onlinegfal_prestagestatusctx.bring_online_poll Release SURLSgfal_releasectx.release Copy a filelcg_cp4ctx.filecopy 18 Remote random IO supported too, and thread safe!
19
Copy a file ctx.filecopy(params, source, dest) Params is an instance of ctx.transfer_parameters Members checksum_check set_user_defined_checksum(algo, value) dst_spacetoken event_callback monitor_callback nbstreams overwrite src_spacetoken timeout 19
20
Examples Check our repository https://svnweb.cern.ch/trac/lcgutil/browser/gfal2-bindings/trunk/example/python 20
21
Do not forget Supported protocols SRM GridFTP HTTP/DAV LFC RFIO DCAP XROOTD New DM Clients and retirement plans for old ones 21
22
Questions? 22
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.