Java API del Logical File Catalog (LFC)

Slides:



Advertisements
Similar presentations
Workflows over Grid-based Web services General framework and a practical case in structural biology gLite 3.0 Data Management Hands-on David García Aristegui.
Advertisements

Workflows over Grid-based Web services General framework and a practical case in structural biology gLite 3.0 Data Management David García Aristegui Grid.
1 CHEP 2000, Roberto Barbera Tests of data management services in EDG 1.2 ALICE Off-line Week,
Grid Data Management Assaf Gottlieb - Israeli Grid NA3 Team EGEE is a project funded by the European Union under contract IST EGEE tutorial,
EGEE is a project funded by the European Union under contract IST Data Services Valeria Ardizzone EGEE NA4 Generic Applications INFN Catania.
File Security. Viewing Permissions ls –l Permission Values.
INFSO-RI Enabling Grids for E-sciencE gLite Data Management Services - Overview Mike Mineter National e-Science Centre, Edinburgh.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Data Grid Services/SRB/SRM & Practical Hai-Ning Wu Academia Sinica Grid Computing.
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America Data Management Hands-on Claudio Cherubino.
The LCG File Catalog (LFC) Jean-Philippe Baud – Sophie Lemaitre IT-GD, CERN May 2005.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE middleware Data Management in gLite.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) GISELA Additional Services Diego Scardaci
EGEE-III INFSO-RI Enabling Grids for E-sciencE Nov. 18, EGEE and gLite are registered trademarks gLite Middleware Usage Dusan.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE middleware: gLite Data Management EGEE Tutorial 23rd APAN Meeting, Manila Jan.
Enabling Grids for E-sciencE Introduction Data Management Jan Just Keijser Nikhef Grid Tutorial, November 2008.
FTP Server API Implementing the FTP Server Registering FTP Command Callbacks Data and Control Port Close Callbacks Other Server Calls.
INFSO-RI Enabling Grids for E-sciencE Experiences with LFC and comparison with RNS Erwin Laure Jean-Philippe.
E-science grid facility for Europe and Latin America Data Management Services E2GRIS1 Rafael Silva – UFCG (Brazil) Universidade Federal.
INFSO-RI Enabling Grids for E-sciencE Αthanasia Asiki Computing Systems Laboratory, National Technical.
INFSO-RI Enabling Grids for E-sciencE Αthanasia Asiki Computing Systems Laboratory, National Technical.
Managing Data DIRAC Project. Outline  Data management components  Storage Elements  File Catalogs  DIRAC conventions for user data  Data operation.
SEE-GRID-SCI Storage Element Installation and Configuration Branimir Ackovic Institute of Physics Serbia The SEE-GRID-SCI.
INFSO-RI Enabling Grids for E-sciencE Introduction Data Management Ron Trompert SARA Grid Tutorial, September 2007.
FP7-INFRA Enabling Grids for E-sciencE EGEE Induction Grid training for users, Institute of Physics Belgrade, Serbia Sep. 19, 2008.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Data management in LCG and EGEE David Smith.
Further aspects of EGEE middleware components INFN, Catania EGEE is funded by the European Union under contract IST
Data Management The European DataGrid Project Team
EGEE-II INFSO-RI Enabling Grids for E-sciencE Data management in EGEE.
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America Data Management Hands-on Juan Eduardo Murrieta.
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks WMProxy Java API & SEE-GRID File Management.
Istituto Nazionale di Astrofisica Information Technology Unit INAF-SI Job with data management Giuliano Taffoni.
INFSO-RI Enabling Grids for E-sciencE University of Coimbra gLite 1.4 Data Management System Salvatore Scifo, Riccardo Bruno Test.
INFSO-RI Enabling Grids for E-sciencE University of Coimbra Data Management System gLite – LCG – FiReMan Salvatore Scifo INFN Catania.
EGEE-II INFSO-RI Enabling Grids for E-sciencE Architecture of LHC File Catalog Valeria Ardizzone INFN Catania – EGEE-II NA3/NA4.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Algiers, EUMED/Epikh Application Porting Tutorial, 2010/07/04.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) LFC Installation and Configuration Dong Xu IHEP,
Grid Data Management Assaf Gottlieb Tel-Aviv University assafgot tau.ac.il EGEE is a project funded by the European Union under contract IST
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) gLite Data Management Maha Metawei
INFSO-RI Enabling Grids for E-sciencE Practicals on LFC and gLite DMS Tony Calanducci Emidio Giorgio INFN Retreat between GILDA.
FP6−2004−Infrastructures−6-SSA E-infrastructure shared between Europe and Latin America LFC Server Installation and Configuration.
Scuola Grid INFN, Trieste, 1-12 Dic Managing Confidential Data in the gLite Middleware – The Secure Storage.
Martedi 8 novembre 2005 Consorzio COMETA “Progetto PI2S2” FESR Data Management System Annamaria Muoio -- INFN Catania PI2S2 First Tutorial -- Messina,
EGEE Data Management Services
GFAL Grid File Access Library
GFAL Grid File Access Library
GFAL: Grid File Access Library
LFC Server Installation & Configuration
gLite Basic APIs Christos Filippidis
The gLite Data Management System
LFC Installation and Configuration
gLite 1.4. Data Mangement Exercises
Scuola Grid INFN, Martina Franca, Nov
gLite Data management system overview
Grid Services Ouafa Bentaleb CERIST, Algeria
The gLite API – Part II Giuseppe LA ROCCA ACGRID-II School
gLite User Interface Installation
Hands-On Session: Data Management
LFC Installation and configuration
GFAL 2.0 Devresse Adrien CERN lcgutil team
Data Management in Release 2
GSAF Grid Storage Access Framework
Riccardo Bruno, Salvatore Scifo gLite - Tutorial Catania, dd.mm.yyyy
Enrico Fattibene INFN-CNAF
GSAF Grid Storage Access Framework
Data Management Ouafa Bentaleb CERIST, Algeria
Data services in gLite “s” gLite and LCG.
Architecture of the gLite Data Management System
gLite Data and Metadata Management
DIRAC Data Management: consistency, integrity and coherence of data
Data Management system in gLite middleware
Presentation transcript:

Java API del Logical File Catalog (LFC) Valeria Ardizzone INFN Catania Martina Franca (TA), 16.11.2007

What is a file catalog File Catalog SE SE SE LFC Features: Mantaining mappings between LFN(s),GUID and SURL(s). Best performance and less security problem than old RLS. It supports transactions, roll-back, sessions m bulk queries. It is a unique catalog where LFN is the main key. Hierarchiacal name-space for LFNs. Symlink to main LFN. System metadata. User metadata (but only a single string entry). File Catalog SE SE gLite UI SE

The LFC (LCG File Catalog) It keeps track of the location of copies (replicas) of Grid files LFN acts as main key in the database. It has: Symbolic links to it (additional LFNs) Unique Identifier (GUID) System metadata Information on replicas One field of user metadata

lcg-cr –vo gilda –l lfn:/ …. LFC high level tool A file is considered to be a Grid file if it is both physically present in a SE and registered in the file catalog. In general high level tools like lcg utils will ensure consistency between files in the SEs and entries in the File Catalog. LFC MyData SE Data lcg-cr –vo gilda –l lfn:/ ….

LFC commands Summary of the LFC Catalog commands lfc-chmod Change access mode of the LFC file/directory lfc-chown Change owner and group of the LFC file-directory lfc-delcomment Delete the comment associated with the file/directory lfc-getacl Get file/directory access control lists lfc-ln Make a symbolic link to a file/directory lfc-ls List file/directory entries in a directory lfc-mkdir Create a directory lfc-rename Rename a file/directory lfc-rm Remove a file/directory lfc-setacl Set file/directory access control lists lfc-setcomment Add/replace a comment

LFC low level tool SE LFC Usage of low level tools, for both data transfer and catalog entries management could cause inconsistencies between SEs physical files and catalog entries; what would imply the corruption of GRID files. This is why the usage of low level tools is strongly discouraged unless really necessary. LFC MyData SE Data lcg_cp( ….) lfc_createg()

File naming convention The Grid Unique IDentifier (GUID), which identifies a file uniquely: guid:_unique string_ guid:93bd772a-b282-4332-a0c5-c79e99fc2e9c The Logical File Name (LFN) or User Alias, which can be used to refer to a file in the place of the GUID: lfn:_anything_you_want_ lfn:/grid/gilda/valeria/myfile.txt The Storage URL (SURL), also known as Physical File Name (PFN), which identifies a replica in a SE: sfn | srm://_SE_hostname_/_some_string_ sfn://_SE_hostname_ _SE_Accesspoint_ _VO_path_ _filename_ srm://aliserv6.ct.infn.it/dpm/ct.infn.it/home/gilda/generated/2006-09-24/….. The Transport URL (TURL), which is a valid URI with the necessary information to access a file in a SE : protocol://_some_string_ gsiftp://tbed0101.cern.ch/flatfiles/SE00/dteam/generated/2004-02-26/file3596e86f-

Java api code examples Several environment variables need to be set before to start: export LCG_GFAL_INFOSYS=bdii.gs.ba.infn.it:2170 export LCG_CATALOG_TYPE=lfc export LFC_HOST=lfc.gs.ba.infn.it This class is intended for use with gLite3.0 grid middleware and current version uses LFC API and GFAL API C libraries. The example are created using the LFC java API tool developed in the contest of the SEE-GRID2 project.

Example: Listing a catalogue directory(1) > cat repmngr.properties e.o, LFest Java API properties. This file's location needs to be in classpath. # # Name of Virtual Organisation VO = gilda # List of available Storage Elements separated by space character SEList = se-dpm1.gs.ba.infn.it se-dcache1.gs.ba.infn.it se-dpm2.gs.ba.infn.it se-dcache2.gs.ba.infn.it

Example: Listing a catalogue directory(2) LFCDataStorage is an implementation of DataStorageInterface which provides information and access to data storage resources of a grid. LFCDirectoryItem class provide methods for retrieveing directory information and data management. ... DataStorageInterface dsi = new LFCDataStorage(); DirectoryItem di = new LFCDirectoryItem(args[0],null,dsi);

Example: Listing a catalogue directory(3) Using ItemIterator class allows iteration of grid catalogue items, where a item can be any catalogue entry. ItemIterator iter = di.itemIterator(); while(iter.moreChildren()) { Item nextItem = iter.next(); System.out.println( type+ nextItem.getName()+"\t"+ (new LFCFileMode(nextItem.getFileMode()))+"\t"+ nextItem.getUID()+"\t"+ nextItem.getGID()+"\t"+ nextItem.getSize()+" bytes"); System.out.println( "User: "+nextItem.getUser()+"\n"+ "Group: "+nextItem.getGroup()+"\n"+ "Parent: "+nextItem.getParent().getPathName()+"\n"+ "Comment: "+nextItem.getComment()+"\n"); ...

Practicals Download the follow archive which contains the java source for your exercises: wget --no-check-certificate http://repository.gs.ba.infn.it/twiki/pub/GILDA/LFCJA VAAPI/LFC_JAVA_API.tar.gz Wiki page for the exercises: http://repository.gs.ba.infn.it/twiki/bin/view/GILDA/LFCJAVAAPI

LFC C API LFC cli and C API documentation http://grid-deployment.web.cern.ch/grid-deployment/documentation/LFC_DPM/lfc/html/ Example usage C API: lfc_listreplica - list replica entries for a given file #include <sys/types.h> #include “lfc_api.h" struct lfc_filereplica *lfc_listreplica (const char *path, const char *guid, int flags, lfc_list *listp) A C program listing the replicas fo a given sfn could look like: int flags; lfc_list list; struct lfc_filereplica *lp; flags = CNS_LIST_BEGIN; while ((lp = lfc_listreplica (sfn, NULL, flags, &list)) != NULL) { flags = CNS_LIST_CONTINUE; /* process the entry */ ..... } (void) lfc_listreplica (sfn, NULL, CNS_LIST_END, &list);

References GILDA -- Data Management quickstart https://repository.gs.ba.infn.it/twiki/bin/view/GILDA/DataManagement SEE-GRID2 LFC JAVA API http://wiki.egee-see.org/index.php/SEE- GRID_File_Management_Java_API LFC Documentation https://twiki.cern.ch/twiki/bin/view/LCG/LfcAdminGuide#LFC_CLI_an d_API EGEE Middleware Support https://twiki.cern.ch/twiki/bin/view/EGEE/EGEEMiddlewareSupport