DataIntegrityClient

This is the Data Integrity Client which allows the simple reporting of problematic file and replicas to the IntegrityDB and their status correctly updated in the FileCatalog.

class DIRAC.DataManagementSystem.Client.DataIntegrityClient.DataIntegrityClient(**kwargs)

Bases: DIRAC.Core.Base.Client.Client

The following methods are supported in the service but are not mentioned explicitly here:

getProblematic()
Obtains a problematic file from the IntegrityDB based on the LastUpdate time
getPrognosisProblematics(prognosis)
Obtains all the problematics of a particular prognosis from the integrityDB
getProblematicsSummary()
Obtains a count of the number of problematics for each prognosis found
getDistinctPrognosis()
Obtains the distinct prognosis found in the integrityDB
getTransformationProblematics(prodID)
Obtains the problematics for a given production
incrementProblematicRetry(fileID)
Increments the retry count for the supplied file ID
changeProblematicPrognosis(fileID,newPrognosis)
Changes the prognosis of the supplied file to the new prognosis
setProblematicStatus(fileID,status)
Updates the status of a problematic in the integrityDB
removeProblematic(self,fileID)
This removes the specified file ID from the integrity DB
insertProblematic(sourceComponent,fileMetadata)
Inserts file with supplied metadata into the integrity DB
__init__(**kwargs)

C’tor.

Parameters:kwargs – just stored as an attribute and passed when creating the RPCClient
executeRPC(*parms, **kws)

This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.

Parameters:
  • rpc – if an RPC client is passed, use that one
  • timeout – we can change the timeout on a per call bases. Default 120 s
  • url – We can specify which url to use
getServer()

Getter for the server url. Useful ?

reportProblematicReplicas(replicaTuple, se, reason)

Simple wrapper function around setReplicaProblematic

resolveCatalogPFNSizeMismatch(problematicDict)

This takes the problematic dictionary returned by the integrity DB and resolved the CatalogPFNSizeMismatch prognosis

setFileProblematic(lfn, reason, sourceComponent='')

This method updates the status of the file in the FileCatalog and the IntegrityDB

lfn - the lfn of the file reason - this is given to the integrity DB and should reflect the problem observed with the file

sourceComponent is the component issuing the request.

setReplicaProblematic(replicaTuple, sourceComponent='')

This method updates the status of the replica in the FileCatalog and the IntegrityDB The supplied replicaDict should be of the form {lfn :{‘PFN’:pfn,’SE’:se,’Prognosis’:prognosis}

lfn - the lfn of the file pfn - the pfn if available (otherwise ‘’) se - the storage element of the problematic replica (otherwise ‘’) prognosis - this is given to the integrity DB and should reflect the problem observed with the file

sourceComponent is the component issuing the request.

setServer(url)

Set the server URL used by default

Parameters:url – url of the service
setTimeout(timeout)

Specify the timeout of the call. Forwarded to RPCClient

Parameters:timeout – guess…