Skip to content

Commit 19a1f83

Browse files
committed
feat: remove the TransformationDB.DataFiles table
1 parent c3f2274 commit 19a1f83

File tree

8 files changed

+65
-279
lines changed

8 files changed

+65
-279
lines changed

docs/source/AdministratorGuide/Systems/Transformation/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ The TS is a standard DIRAC system, and therefore it is composed by components in
8282
| Tables_in_TransformationDB |
8383
+------------------------------+
8484
| AdditionalParameters |
85-
| DataFiles |
8685
| TaskInputs |
8786
| TransformationFileTasks |
8887
| TransformationFiles |

docs/source/DeveloperGuide/Systems/Transformation/architecture.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ A technical drawing explaining the interactions between the various components f
3030
| Tables_in_TransformationDB |
3131
+------------------------------+
3232
| AdditionalParameters |
33-
| DataFiles |
3433
| TaskInputs |
3534
| TransformationFileTasks |
3635
| TransformationFiles |

src/DIRAC/Resources/Catalog/TSCatalogClient.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"""
44
from DIRAC import S_OK
55
from DIRAC.Core.Utilities.List import breakListIntoChunks
6-
from DIRAC.Resources.Catalog.Utilities import checkCatalogArguments
76
from DIRAC.Resources.Catalog.FileCatalogClientBase import FileCatalogClientBase
7+
from DIRAC.Resources.Catalog.Utilities import checkCatalogArguments
88

99

1010
class TSCatalogClient(FileCatalogClientBase):
1111

1212
"""Exposes the catalog functionality available in the DIRAC/TransformationHandler"""
1313

1414
# List of common File Catalog methods implemented by this client
15-
WRITE_METHODS = FileCatalogClientBase.WRITE_METHODS + ["addFile", "removeFile", "setMetadata"]
15+
WRITE_METHODS = FileCatalogClientBase.WRITE_METHODS + ["addFile", "setMetadata"]
1616

1717
NO_LFN_METHODS = ["setMetadata"]
1818

@@ -25,21 +25,6 @@ def addFile(self, lfns, force=False):
2525
rpcClient = self._getRPC()
2626
return rpcClient.addFile(lfns, force)
2727

28-
@checkCatalogArguments
29-
def removeFile(self, lfns):
30-
rpcClient = self._getRPC()
31-
successful = {}
32-
failed = {}
33-
listOfLists = breakListIntoChunks(lfns, 100)
34-
for fList in listOfLists:
35-
res = rpcClient.removeFile(fList)
36-
if not res["OK"]:
37-
return res
38-
successful.update(res["Value"]["Successful"])
39-
failed.update(res["Value"]["Failed"])
40-
resDict = {"Successful": successful, "Failed": failed}
41-
return S_OK(resDict)
42-
4328
def setMetadata(self, path, metadatadict):
4429
"""Set metadata parameter for the given path
4530

src/DIRAC/TransformationSystem/Client/TransformationCLI.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
DIRAC.initialize() # Initialize configuration
66

7-
from DIRAC.Core.Base.CLI import CLI
87
from DIRAC.Core.Base.API import API
8+
from DIRAC.Core.Base.CLI import CLI
99
from DIRAC.Core.Utilities.Subprocess import shellCall
10+
from DIRAC.Resources.Catalog.FileCatalog import FileCatalog
1011
from DIRAC.TransformationSystem.Client import TransformationFilesStatus
1112
from DIRAC.TransformationSystem.Client.Transformation import Transformation
1213
from DIRAC.TransformationSystem.Client.TransformationClient import TransformationClient
13-
from DIRAC.Resources.Catalog.FileCatalog import FileCatalog
1414

1515

1616
def printDict(dictionary):
@@ -563,25 +563,6 @@ def do_addFile(self, args):
563563
for lfn in sorted(res["Value"]["Successful"]):
564564
print(f"added {lfn}")
565565

566-
def do_removeFile(self, args):
567-
"""Remove file from transformation DB
568-
569-
usage: removeFile <lfn> [lfn]
570-
"""
571-
argss = args.split()
572-
if not len(argss) > 0:
573-
print("no files supplied")
574-
return
575-
res = self.transClient.removeFile(argss)
576-
if not res["OK"]:
577-
print(f"failed to remove any files: {res['Message']}")
578-
return
579-
for lfn in sorted(res["Value"]["Failed"]):
580-
error = res["Value"]["Failed"][lfn]
581-
print(f"failed to remove {lfn}: {error}")
582-
for lfn in sorted(res["Value"]["Successful"]):
583-
print(f"removed {lfn}")
584-
585566
def do_addReplica(self, args):
586567
"""Add new replica to the transformation DB
587568

src/DIRAC/TransformationSystem/Client/TransformationClient.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class TransformationClient(Client):
4646
File/directory manipulation methods (the remainder of the interface can be found below)
4747
4848
getFileSummary(lfns)
49-
exists(lfns)
5049
5150
Web monitoring tools
5251

0 commit comments

Comments
 (0)