FTS3Utilities

Some utilities for FTS3…

class DIRAC.DataManagementSystem.private.FTS3Utilities.FTS3ServerPolicy(serverDict, serverPolicy='Random')

Bases: object

This class manages the policy for choosing a server

__init__(serverDict, serverPolicy='Random')

Call the init of the parent, and initialize the list of FTS3 servers

chooseFTS3Server()

Choose the appropriate FTS3 server depending on the policy

DIRAC.DataManagementSystem.private.FTS3Utilities.groupFilesByTarget(ftsFiles)

For a list of FTS3files object, group the Files by target

Parameters:ftsFiles – list of FTS3File object
Returns:{targetSE : [ ftsFiles] } }
DIRAC.DataManagementSystem.private.FTS3Utilities.selectUniqueRandomSource(ftsFiles, allowedSources=None)

For a list of FTS3files object, select a random source, and group the files by source.

We also return the FTS3Files for which we had problems getting replicas

Parameters:
  • allowedSources – list of allowed sources
  • ftsFiles – list of FTS3File object
Returns:

S_OK(({ sourceSE: [ FTS3Files] }, {FTS3File: errors}))