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:
Client
Client exposing the DataIntegrity Service.
- __init__(**kwargs)¶
C’tor.
- Parameters
kwargs – just stored as an attribute and passed when creating the RPCClient
- property call¶
To be removed once we’re sure self.call has been removed
- Type
Deprecated
- changeProblematicPrognosis(self, fileID, newPrognosis, **kwargs)¶
Change the prognosis for the supplied file
Automatically created for the service function
export_changeProblematicPrognosis()
- Parameters
fileID – fileID
newPrognosis – newPrognosis
- 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 is self.timeout
url – We can specify which url to use
- getClientKWArgs()¶
Returns a copy of the connection arguments
- getDistinctPrognosis(self, **kwargs)¶
Get a list of the distinct prognosis from the IntegrityDB
Automatically created for the service function
export_getDistinctPrognosis()
- getProblematic(self, **kwargs)¶
Get the next problematic to resolve from the IntegrityDB
Automatically created for the service function
export_getProblematic()
- getProblematicsSummary(self, **kwargs)¶
Get a summary from the Problematics table from the IntegrityDB
Automatically created for the service function
export_getProblematicsSummary()
- getPrognosisProblematics(self, prognosis, **kwargs)¶
Get problematic files from the problematics table of the IntegrityDB
Automatically created for the service function
export_getPrognosisProblematics()
- Parameters
prognosis – prognosis
- getServer()¶
Getter for the server url. Useful ?
- getTransformationProblematics(self, transID, **kwargs)¶
Get the problematics for a given transformation
Automatically created for the service function
export_getTransformationProblematics()
- Parameters
transID – transID
- httpsClient¶
alias of
TornadoClient
- incrementProblematicRetry(self, fileID, **kwargs)¶
Update the retry count for supplied file ID.
Automatically created for the service function
export_incrementProblematicRetry()
- Parameters
fileID – fileID
- insertProblematic(self, source, fileMetadata, **kwargs)¶
Insert problematic files into the problematics table of the IntegrityDB
Automatically created for the service function
export_insertProblematic()
- Parameters
source – source
fileMetadata – fileMetadata
- removeProblematic(self, fileID, **kwargs)¶
Remove the file with the supplied FileID from the database
Automatically created for the service function
export_removeProblematic()
- Parameters
fileID – fileID
- 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.
- setProblematicStatus(self, fileID, status, **kwargs)¶
Update the status of the problematics with the provided fileID
Automatically created for the service function
export_setProblematicStatus()
- Parameters
fileID – fileID
status – status
- 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