+ All Categories
Home > Documents > The gLite API – Part II

The gLite API – Part II

Date post: 03-Jan-2016
Category:
Upload: kellie-hoover
View: 19 times
Download: 0 times
Share this document with a friend
Description:
The gLite API – Part II. Giuseppe LA ROCCA INFN Catania [email protected] ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia. S E E-G R I D File Management J a v a A P I ver 1.3. Overview of the SEE-GRID File Management Java API Requirements & Configuration - PowerPoint PPT Presentation
Popular Tags:
20
The gLite API – Part II Giuseppe LA ROCCA INFN Catania [email protected] ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia
Transcript
Page 1: The gLite API – Part II

The gLite API – Part IIGiuseppe LA ROCCA INFN [email protected]

ACGRID-II School2-14 November 2009 Kuala Lumpur - Malaysia

Page 2: The gLite API – Part II

S E E-G R I D File ManagementJ a v a A P I

ver 1.3

Overview of the SEE-GRID File Management Java APIRequirements & Configuration

The Classes : LFCDataStorage, LFCDirectoryItem and LFCFileItemHands-on

Page 3: The gLite API – Part II

Overview of the gLite DM API

Page 4: The gLite API – Part II

Overview

• SEE-GRID File Management Java API supports most of the data management operations offered by LFC and LCG_UTILS C APIs.

• These Java API are compatible with LCG 2.7.x and gLite grid middleware.

• The initial version was created within SEE-GRID project

Page 5: The gLite API – Part II

Available feature(s)• Uploading / Downloading files

from UI to grid

• Reading file information: permissions, GUID, comment

• Listing file replicas

• File management operations: – replicating files, deleting files

and file replicas, unregistering files and file replicas

• Reading directory information – Permissions, comment

• Listing directory contents

• Reading user and group ids for files and directories

• Reading user and group names for files and directories

• Reading filemode information as described in LFC C/C++ API manual

• Listing file/directory aliases

• Alias management operations (create/rename/delete)

• Reading file/directory date information

• Additional file management operations (rename/move)

• Directory management (create/rename/move)

• File/directory comment modification

• Listing of SE from BDII with the ability to ignore some SEs set in a properties file

• Directory management (delete)

Page 6: The gLite API – Part II

Installation and Configuration /1

0.) First of all you have to install the following APIs:– GFAL C/C++ API– lcg_util C/C++ API– LFC C/C++ API– gLite FTS Java API

1.) Then you have to download the SEE-GRID File Management API (see references)

These APIs come with the last release of gLite middleware and should be already installed and configured by

your sys-admin.

Page 7: The gLite API – Part II

2.) Set the CLASSPATH variable to contain the path of the SEE-GRID File Management API.

– Set the value of the VO variable with the name of your Virtual Organization

– Set the value of bdii.host.name and bdii.host.port

– Optionally, set the value of property SE.ignore.list with the list of SEs to be ignored when obtaining availables SEs from the BDII.

Installation and Configuration /2

Page 8: The gLite API – Part II

$ cat repmngr.properties e.o, LFest Java API properties. This file's location needs to be in classpath.

## Name of Virtual OrganisationVO = gilda# List of available Storage Elements SEList = iceage-se-01.ct.infn.it

aliserv6.ct.infn.it se.hpc.iit.bme.hu gilda-02.pd.infn.it fn2.hpcc.sztaki.hu

# List of Storage Elements to ignore even if published

SE.ignore.list = egee016.cnaf.infn.it

bdii.host.name = gilda-bdii.ct.infn.itbdii.host.port = 2170

Page 9: The gLite API – Part II

3.) Set the LCG_GFAL_INFOSYS and LFC_HOST variables as follow:

export LFC_HOST=lfc-gilda.ct.infn.it

export LCG_GFAL_INFOSYS=gilda-bdii.ct.infn.it:2170

Installation and Configuration /3

Page 10: The gLite API – Part II

• LFCDataStorage class is an implementation of DataStorageInterface which provides information and access to data storage resources of a grid.

Page 11: The gLite API – Part II

• LFCDirectoryItem class provides methods to retrieve directory information and data management.

Page 12: The gLite API – Part II

• LFCFileItem class provides methods to retrieve file information and data management.

Page 13: The gLite API – Part II

Listing directory content of a LFC

$ java LfcLs /grid/gilda/drwxrwxr-x 124 104 0 aula_griddrwxrwxr-x 124 104 0 aula_grid_11drwxrwxr-x 152 104 0 balaskodrwxrwxr-x 137 104 0 cdgdrwxrwxr-x 129 104 0 clermontdrwxrwxr-x 101 104 0 corsogriddrwxrwxr-x 112 117 0 emidio[..cut..]

Page 14: The gLite API – Part II

Retrieve list of SE(s) from the BDII

Page 15: The gLite API – Part II

Copy and register file(s) on the SE

Page 16: The gLite API – Part II

$ java copyAndRegister /home/larocca/HEPIX/Api-Java-LFC-1.3/compile-exercises.sh \

/grid/gilda/tutorials \

compile-exercises.sh \

aliserv6.ct.infn.it

File /home/larocca/HEPIX/Api-Java-LFC-1.3/compile-exercises.sh copied and registed as: /grid/gilda/tutorials/compile-exercises.sh

Copy and register file(s) on the SE /2

Page 17: The gLite API – Part II

Replicating files

Page 18: The gLite API – Part II

$ java replicate

Replicate file to given SE.

Usage: java replicate <gridDestFileName> <target_SE>

$ java replicate

/grid/gilda/tutorials/compile-examples.sh vega-se.ct.infn.it

Replication successful: true

Replicating files

Page 19: The gLite API – Part II

References• SEE-GRID File Management Java API Documentation

http://grid02.rcub.bg.ac.yu/LFCJavaAPI/files/docs/javadoc/version1.3/index.html

• Source code (version 1.3) [released 11/07/2007]

http://grid02.rcub.bg.ac.yu/LFCJavaAPI/files/downloads/SEE-GRIDFileManagementAPI-v1.3.zip

Page 20: The gLite API – Part II

Hands-on

• Connect to the training infrastructure using the information reported in the tutorial sheet

• Run the hands-on available in this web link: http://www.euasiagrid.org/wiki/index.php/WMProxy_Java_API

• Enjoy!

$ cd ${HOME}/Api-Java-LFC-1.3To compile Java code run:

$ source compile-exercises.sh


Recommended