DIRAC 9.0.9__py3-none-any.whl → 9.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- DIRAC/Core/Utilities/ElasticSearchDB.py +1 -2
- DIRAC/DataManagementSystem/Client/DataManager.py +6 -7
- DIRAC/Interfaces/Utilities/DConfigCache.py +2 -0
- DIRAC/TransformationSystem/Agent/InputDataAgent.py +4 -1
- DIRAC/TransformationSystem/Agent/MCExtensionAgent.py +5 -2
- DIRAC/TransformationSystem/Agent/TaskManagerAgentBase.py +3 -1
- DIRAC/TransformationSystem/Agent/TransformationCleaningAgent.py +11 -3
- DIRAC/TransformationSystem/Agent/ValidateOutputDataAgent.py +4 -2
- DIRAC/TransformationSystem/Client/TransformationClient.py +9 -1
- DIRAC/TransformationSystem/DB/TransformationDB.py +105 -43
- {dirac-9.0.9.dist-info → dirac-9.0.10.dist-info}/METADATA +2 -2
- {dirac-9.0.9.dist-info → dirac-9.0.10.dist-info}/RECORD +16 -16
- {dirac-9.0.9.dist-info → dirac-9.0.10.dist-info}/WHEEL +0 -0
- {dirac-9.0.9.dist-info → dirac-9.0.10.dist-info}/entry_points.txt +0 -0
- {dirac-9.0.9.dist-info → dirac-9.0.10.dist-info}/licenses/LICENSE +0 -0
- {dirac-9.0.9.dist-info → dirac-9.0.10.dist-info}/top_level.txt +0 -0
|
@@ -82,7 +82,6 @@ def generateDocs(data, withTimeStamp=True):
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
class ElasticSearchDB:
|
|
85
|
-
|
|
86
85
|
"""
|
|
87
86
|
.. class:: ElasticSearchDB
|
|
88
87
|
|
|
@@ -506,7 +505,7 @@ class ElasticSearchDB:
|
|
|
506
505
|
indexName = self.generateFullIndexName(indexPrefix, period)
|
|
507
506
|
else:
|
|
508
507
|
indexName = indexPrefix
|
|
509
|
-
sLog.debug(f"Bulk indexing into {indexName} of {data}")
|
|
508
|
+
sLog.debug(f"Bulk indexing into {indexName} of {len(data)}")
|
|
510
509
|
|
|
511
510
|
res = self.existingIndex(indexName)
|
|
512
511
|
if not res["OK"]:
|
|
@@ -10,11 +10,11 @@ This module consists of DataManager and related classes.
|
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
# # imports
|
|
13
|
-
|
|
13
|
+
import errno
|
|
14
14
|
import fnmatch
|
|
15
15
|
import os
|
|
16
16
|
import time
|
|
17
|
-
import
|
|
17
|
+
from datetime import datetime, timedelta
|
|
18
18
|
|
|
19
19
|
# # from DIRAC
|
|
20
20
|
import DIRAC
|
|
@@ -25,13 +25,13 @@ from DIRAC.Core.Utilities.File import makeGuid, getSize
|
|
|
25
25
|
from DIRAC.Core.Utilities.List import randomize, breakListIntoChunks
|
|
26
26
|
from DIRAC.Core.Utilities.ReturnValues import returnSingleResult
|
|
27
27
|
from DIRAC.Core.Security.ProxyInfo import getProxyInfo
|
|
28
|
+
from DIRAC.Core.Security.ProxyInfo import getVOfromProxyGroup
|
|
28
29
|
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
|
|
29
30
|
from DIRAC.DataManagementSystem.Client import MAX_FILENAME_LENGTH
|
|
30
|
-
from DIRAC.MonitoringSystem.Client.DataOperationSender import DataOperationSender
|
|
31
31
|
from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers
|
|
32
|
+
from DIRAC.MonitoringSystem.Client.DataOperationSender import DataOperationSender
|
|
32
33
|
from DIRAC.Resources.Catalog.FileCatalog import FileCatalog
|
|
33
34
|
from DIRAC.Resources.Storage.StorageElement import StorageElement
|
|
34
|
-
from DIRAC.ResourceStatusSystem.Client.ResourceStatus import ResourceStatus
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
# # RSCID
|
|
@@ -89,7 +89,7 @@ class DataManager:
|
|
|
89
89
|
:param vo: the VO for which the DataManager is created, get VO from the current proxy if not specified
|
|
90
90
|
"""
|
|
91
91
|
self.log = gLogger.getSubLogger(self.__class__.__name__)
|
|
92
|
-
self.voName = vo
|
|
92
|
+
self.voName = vo if vo else getVOfromProxyGroup().get("Value", None)
|
|
93
93
|
|
|
94
94
|
if catalogs is None:
|
|
95
95
|
catalogs = []
|
|
@@ -97,10 +97,9 @@ class DataManager:
|
|
|
97
97
|
|
|
98
98
|
self.fileCatalog = FileCatalog(catalogs=catalogsToUse, vo=self.voName)
|
|
99
99
|
self.accountingClient = None
|
|
100
|
-
self.resourceStatus = ResourceStatus()
|
|
101
100
|
self.ignoreMissingInFC = Operations(vo=self.voName).getValue("DataManagement/IgnoreMissingInFC", False)
|
|
102
101
|
self.useCatalogPFN = Operations(vo=self.voName).getValue("DataManagement/UseCatalogPFN", True)
|
|
103
|
-
self.dmsHelper = DMSHelpers(vo=
|
|
102
|
+
self.dmsHelper = DMSHelpers(vo=self.voName)
|
|
104
103
|
self.registrationProtocol = self.dmsHelper.getRegistrationProtocols()
|
|
105
104
|
self.thirdPartyProtocols = self.dmsHelper.getThirdPartyProtocols()
|
|
106
105
|
self.dataOpSender = DataOperationSender()
|
|
@@ -9,6 +9,7 @@ from DIRAC import gLogger
|
|
|
9
9
|
from DIRAC.Core.Base.Script import Script
|
|
10
10
|
from DIRAC.Core.Utilities.File import secureOpenForWrite
|
|
11
11
|
from DIRAC.ConfigurationSystem.Client.ConfigurationData import gConfigurationData
|
|
12
|
+
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import reset_all_caches
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class ConfigCache:
|
|
@@ -69,5 +70,6 @@ class ConfigCache:
|
|
|
69
70
|
try:
|
|
70
71
|
with open(self.configCacheName, "rb") as fh:
|
|
71
72
|
gConfigurationData.mergedCFG = pickle.load(fh)
|
|
73
|
+
reset_all_caches()
|
|
72
74
|
except:
|
|
73
75
|
gLogger.error("Cache corrupt or unreadable")
|
|
@@ -74,7 +74,10 @@ class InputDataAgent(AgentModule):
|
|
|
74
74
|
"""Main execution method"""
|
|
75
75
|
|
|
76
76
|
# Get all the transformations
|
|
77
|
-
result = self.transClient.getTransformations(
|
|
77
|
+
result = self.transClient.getTransformations(
|
|
78
|
+
{"Status": "Active", "Type": self.transformationTypes},
|
|
79
|
+
columns=["TransformationID", "AuthorDN", "AuthorGroup"],
|
|
80
|
+
)
|
|
78
81
|
if not result["OK"]:
|
|
79
82
|
self.log.error("InputDataAgent.execute: Failed to get transformations.", result["Message"])
|
|
80
83
|
return S_OK()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Agent to extend the number of tasks given the Transformation definition
|
|
2
2
|
|
|
3
3
|
The following options can be set for the MCExtensionAgent.
|
|
4
4
|
|
|
@@ -8,6 +8,7 @@ The following options can be set for the MCExtensionAgent.
|
|
|
8
8
|
:dedent: 2
|
|
9
9
|
:caption: MCExtensionAgent options
|
|
10
10
|
"""
|
|
11
|
+
|
|
11
12
|
from DIRAC import S_OK, gLogger
|
|
12
13
|
from DIRAC.Core.Base.AgentModule import AgentModule
|
|
13
14
|
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations
|
|
@@ -54,7 +55,9 @@ class MCExtensionAgent(AgentModule):
|
|
|
54
55
|
return S_OK("Disabled via CS flag")
|
|
55
56
|
|
|
56
57
|
# Obtain the transformations in Cleaning status and remove any mention of the jobs/files
|
|
57
|
-
res = self.transClient.getTransformations(
|
|
58
|
+
res = self.transClient.getTransformations(
|
|
59
|
+
{"Status": "Active", "Type": self.transformationTypes}, columns=["TransformationID", "MaxNumberOfTasks"]
|
|
60
|
+
)
|
|
58
61
|
if res["OK"]:
|
|
59
62
|
for transDict in res["Value"]:
|
|
60
63
|
transID = transDict["TransformationID"]
|
|
@@ -231,7 +231,9 @@ class TaskManagerAgentBase(AgentModule, TransformationAgentsUtilities):
|
|
|
231
231
|
selectCond["Type"] = transType
|
|
232
232
|
if agentType:
|
|
233
233
|
selectCond["AgentType"] = agentType
|
|
234
|
-
res = self.transClient.getTransformations(
|
|
234
|
+
res = self.transClient.getTransformations(
|
|
235
|
+
condDict=selectCond, columns=["TransformationID", "Body", "Author", "AuthorGroup"]
|
|
236
|
+
)
|
|
235
237
|
if not res["OK"]:
|
|
236
238
|
self.log.error("Failed to get transformations:", res["Message"])
|
|
237
239
|
elif not res["Value"]:
|
|
@@ -144,7 +144,8 @@ class TransformationCleaningAgent(AgentModule):
|
|
|
144
144
|
|
|
145
145
|
# Obtain the transformations in Cleaning status and remove any mention of the jobs/files
|
|
146
146
|
res = self.transClient.getTransformations(
|
|
147
|
-
{"Status": TransformationStatus.CLEANING, "Type": self.transformationTypes}
|
|
147
|
+
{"Status": TransformationStatus.CLEANING, "Type": self.transformationTypes},
|
|
148
|
+
columns=["TransformationID", "Author", "AuthorGroup", "Type"],
|
|
148
149
|
)
|
|
149
150
|
if res["OK"]:
|
|
150
151
|
for transDict in res["Value"]:
|
|
@@ -161,7 +162,10 @@ class TransformationCleaningAgent(AgentModule):
|
|
|
161
162
|
self.log.error("Failed to get transformations", res["Message"])
|
|
162
163
|
|
|
163
164
|
# Obtain the transformations in RemovingFiles status and removes the output files
|
|
164
|
-
res = self.transClient.getTransformations(
|
|
165
|
+
res = self.transClient.getTransformations(
|
|
166
|
+
{"Status": "RemovingFiles", "Type": self.transformationTypes},
|
|
167
|
+
columns=["TransformationID", "Author", "AuthorGroup"],
|
|
168
|
+
)
|
|
165
169
|
if res["OK"]:
|
|
166
170
|
for transDict in res["Value"]:
|
|
167
171
|
if self.shifterProxy:
|
|
@@ -183,6 +187,7 @@ class TransformationCleaningAgent(AgentModule):
|
|
|
183
187
|
{"Status": TransformationStatus.COMPLETED, "Type": self.transformationTypes},
|
|
184
188
|
older=olderThanTime,
|
|
185
189
|
timeStamp="LastUpdate",
|
|
190
|
+
columns=["TransformationID", "Author", "AuthorGroup"],
|
|
186
191
|
)
|
|
187
192
|
if res["OK"]:
|
|
188
193
|
for transDict in res["Value"]:
|
|
@@ -230,7 +235,10 @@ class TransformationCleaningAgent(AgentModule):
|
|
|
230
235
|
return res
|
|
231
236
|
transformationIDs = res["Value"]
|
|
232
237
|
if transformationIDs:
|
|
233
|
-
res = self.transClient.getTransformations(
|
|
238
|
+
res = self.transClient.getTransformations(
|
|
239
|
+
{"TransformationID": transformationIDs},
|
|
240
|
+
columns=["TransformationID", "Status", "Author", "AuthorGroup", "Type"],
|
|
241
|
+
)
|
|
234
242
|
if not res["OK"]:
|
|
235
243
|
self.log.error("Failed to get transformations", res["Message"])
|
|
236
244
|
return res
|
|
@@ -76,7 +76,9 @@ class ValidateOutputDataAgent(AgentModule):
|
|
|
76
76
|
self.updateWaitingIntegrity()
|
|
77
77
|
gLogger.info("-" * 40)
|
|
78
78
|
|
|
79
|
-
res = self.transClient.getTransformations(
|
|
79
|
+
res = self.transClient.getTransformations(
|
|
80
|
+
{"Status": "ValidatingOutput", "Type": self.transformationTypes}, columns=["TransformationID"]
|
|
81
|
+
)
|
|
80
82
|
if not res["OK"]:
|
|
81
83
|
gLogger.error("Failed to get ValidatingOutput transformations", res["Message"])
|
|
82
84
|
return res
|
|
@@ -98,7 +100,7 @@ class ValidateOutputDataAgent(AgentModule):
|
|
|
98
100
|
def updateWaitingIntegrity(self):
|
|
99
101
|
"""Get 'WaitingIntegrity' transformations, update to 'ValidatedOutput'"""
|
|
100
102
|
gLogger.info("Looking for transformations in the WaitingIntegrity status to update")
|
|
101
|
-
res = self.transClient.getTransformations({"Status": "WaitingIntegrity"})
|
|
103
|
+
res = self.transClient.getTransformations({"Status": "WaitingIntegrity"}, columns=["TransformationID"])
|
|
102
104
|
if not res["OK"]:
|
|
103
105
|
gLogger.error("Failed to get WaitingIntegrity transformations", res["Message"])
|
|
104
106
|
return res
|
|
@@ -114,13 +114,21 @@ class TransformationClient(Client):
|
|
|
114
114
|
newer=None,
|
|
115
115
|
timeStamp=None,
|
|
116
116
|
orderAttribute=None,
|
|
117
|
-
limit=
|
|
117
|
+
limit=None,
|
|
118
118
|
extraParams=False,
|
|
119
119
|
columns=None,
|
|
120
120
|
):
|
|
121
121
|
"""gets all the transformations in the system, incrementally. "limit" here is just used to determine the offset."""
|
|
122
122
|
rpcClient = self._getRPC()
|
|
123
123
|
|
|
124
|
+
# If the body is requested (or is served by default)
|
|
125
|
+
# we take smaller chunk, not to take too much memory
|
|
126
|
+
# on the server
|
|
127
|
+
if columns and "Body" not in columns:
|
|
128
|
+
limit = 100_000
|
|
129
|
+
else:
|
|
130
|
+
limit = 1_000
|
|
131
|
+
|
|
124
132
|
transformations = []
|
|
125
133
|
if condDict is None:
|
|
126
134
|
condDict = {}
|
|
@@ -6,6 +6,9 @@ This class is typically used as a base class for more specific data processing
|
|
|
6
6
|
databases
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
+
# Disable it because pylint does not understand decorator (convertToReturnValue)
|
|
10
|
+
|
|
11
|
+
# pylint: disable=invalid-sequence-index
|
|
9
12
|
import re
|
|
10
13
|
import time
|
|
11
14
|
import threading
|
|
@@ -15,6 +18,7 @@ from errno import ENOENT
|
|
|
15
18
|
from DIRAC import gLogger, S_OK, S_ERROR
|
|
16
19
|
from DIRAC.Core.Base.DB import DB
|
|
17
20
|
from DIRAC.Core.Utilities.DErrno import cmpError
|
|
21
|
+
from DIRAC.Core.Utilities.ReturnValues import convertToReturnValue, returnValueOrRaise
|
|
18
22
|
from DIRAC.Resources.Catalog.FileCatalog import FileCatalog
|
|
19
23
|
from DIRAC.Core.Security.ProxyInfo import getProxyInfo
|
|
20
24
|
from DIRAC.Core.Utilities.List import stringListToString, intListToString, breakListIntoChunks
|
|
@@ -25,6 +29,7 @@ from DIRAC.DataManagementSystem.Client.MetaQuery import MetaQuery
|
|
|
25
29
|
|
|
26
30
|
MAX_ERROR_COUNT = 10
|
|
27
31
|
|
|
32
|
+
TMP_TABLE_JOIN_LIMIT = 100
|
|
28
33
|
#############################################################################
|
|
29
34
|
|
|
30
35
|
|
|
@@ -270,6 +275,7 @@ class TransformationDB(DB):
|
|
|
270
275
|
self.__updateTransformationLogging(transID, message, author, connection=connection)
|
|
271
276
|
return S_OK(transID)
|
|
272
277
|
|
|
278
|
+
@convertToReturnValue
|
|
273
279
|
def getTransformations(
|
|
274
280
|
self,
|
|
275
281
|
condDict=None,
|
|
@@ -289,32 +295,54 @@ class TransformationDB(DB):
|
|
|
289
295
|
columns = self.TRANSPARAMS
|
|
290
296
|
else:
|
|
291
297
|
columns = [c for c in columns if c in self.TRANSPARAMS]
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
298
|
+
|
|
299
|
+
join_query = ""
|
|
300
|
+
|
|
301
|
+
try:
|
|
302
|
+
# If we request multiple TransformationIDs, and they are more than TMP_TABLE_JOIN_LIMIT,
|
|
303
|
+
# we create a temporary table to speed up the query
|
|
304
|
+
if (
|
|
305
|
+
"TransformationID" in condDict
|
|
306
|
+
and isinstance(condDict["TransformationID"], list)
|
|
307
|
+
and len(condDict["TransformationID"]) > TMP_TABLE_JOIN_LIMIT
|
|
308
|
+
):
|
|
309
|
+
# Create temporary table for TransformationIDs
|
|
310
|
+
transIDs = condDict.pop("TransformationID")
|
|
311
|
+
sqlCmd = "CREATE TEMPORARY TABLE to_query_TransformationIDs (TransID INTEGER NOT NULL, PRIMARY KEY (TransID)) ENGINE=MEMORY;"
|
|
312
|
+
returnValueOrRaise(self._update(sqlCmd, conn=connection))
|
|
313
|
+
join_query = " JOIN to_query_TransformationIDs t ON TransformationID = t.TransID"
|
|
314
|
+
|
|
315
|
+
# Insert TransformationIDs into temporary table
|
|
316
|
+
sqlCmd = "INSERT INTO to_query_TransformationIDs (TransID) VALUES ( %s )"
|
|
317
|
+
returnValueOrRaise(self._updatemany(sqlCmd, [(transID,) for transID in transIDs], conn=connection))
|
|
318
|
+
|
|
319
|
+
req = "SELECT {} FROM Transformations {} {}".format(
|
|
320
|
+
intListToString(columns),
|
|
321
|
+
join_query,
|
|
322
|
+
self.buildCondition(condDict, older, newer, timeStamp, orderAttribute, limit, offset=offset),
|
|
323
|
+
)
|
|
324
|
+
matching_transformations = returnValueOrRaise(self._query(req, conn=connection))
|
|
325
|
+
|
|
326
|
+
finally:
|
|
327
|
+
# Clean up temporary table
|
|
328
|
+
if join_query:
|
|
329
|
+
sqlCmd = "DROP TEMPORARY TABLE to_query_TransformationIDs"
|
|
330
|
+
self._update(sqlCmd, conn=connection)
|
|
331
|
+
|
|
332
|
+
# TODO: optimize by getting all the extra params at once
|
|
302
333
|
resultList = []
|
|
303
|
-
for row in
|
|
334
|
+
for row in matching_transformations:
|
|
304
335
|
# Prepare the structure for the web
|
|
305
|
-
rList = [str(item) if not isinstance(item, int) else item for item in row]
|
|
306
336
|
transDict = dict(zip(columns, row))
|
|
307
|
-
webList.append(rList)
|
|
308
337
|
if extraParams:
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
338
|
+
trans_extra_param = returnValueOrRaise(
|
|
339
|
+
self.__getAdditionalParameters(transDict["TransformationID"], connection=connection)
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
transDict.update(trans_extra_param)
|
|
313
343
|
resultList.append(transDict)
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
result["ParameterNames"] = columns
|
|
317
|
-
return result
|
|
344
|
+
|
|
345
|
+
return resultList
|
|
318
346
|
|
|
319
347
|
def getTransformation(self, transName, extraParams=False, connection=False):
|
|
320
348
|
"""Get Transformation definition and parameters of Transformation identified by TransformationID"""
|
|
@@ -710,21 +738,38 @@ class TransformationDB(DB):
|
|
|
710
738
|
countDict["Total"] = sum(countDict.values())
|
|
711
739
|
return S_OK(countDict)
|
|
712
740
|
|
|
741
|
+
@convertToReturnValue
|
|
713
742
|
def __addFilesToTransformation(self, transID, fileIDs, connection=False):
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
743
|
+
# Create temporary table for FileIDs
|
|
744
|
+
sqlCmd = "CREATE TEMPORARY TABLE to_query_FileIDs (FileID INT(11) UNSIGNED NOT NULL, PRIMARY KEY (FileID)) ENGINE=MEMORY;"
|
|
745
|
+
returnValueOrRaise(self._update(sqlCmd, conn=connection))
|
|
746
|
+
|
|
747
|
+
try:
|
|
748
|
+
# Insert FileIDs into temporary table
|
|
749
|
+
sqlCmd = "INSERT INTO to_query_FileIDs (FileID) VALUES ( %s )"
|
|
750
|
+
returnValueOrRaise(self._updatemany(sqlCmd, [(fileID,) for fileID in fileIDs], conn=connection))
|
|
751
|
+
|
|
752
|
+
# Query existing files using JOIN
|
|
753
|
+
req = (
|
|
754
|
+
"SELECT tf.FileID FROM TransformationFiles tf JOIN to_query_FileIDs t ON tf.FileID = t.FileID WHERE tf.TransformationID = %d;"
|
|
755
|
+
% transID
|
|
756
|
+
)
|
|
757
|
+
res = returnValueOrRaise(self._query(req, conn=connection))
|
|
758
|
+
|
|
759
|
+
# Remove already existing fileIDs using set difference for efficiency
|
|
760
|
+
existingFileIDs = {tupleIn[0] for tupleIn in res}
|
|
761
|
+
fileIDs = list(set(fileIDs) - existingFileIDs)
|
|
762
|
+
if not fileIDs:
|
|
763
|
+
return []
|
|
764
|
+
|
|
765
|
+
values = [(transID, fileID) for fileID in fileIDs]
|
|
766
|
+
req = "INSERT INTO TransformationFiles (TransformationID,FileID,LastUpdate,InsertedTime) VALUES (%s, %s, UTC_TIMESTAMP(), UTC_TIMESTAMP())"
|
|
767
|
+
returnValueOrRaise(self._updatemany(req, values, conn=connection))
|
|
768
|
+
return fileIDs
|
|
769
|
+
finally:
|
|
770
|
+
# Clean up temporary table
|
|
771
|
+
sqlCmd = "DROP TEMPORARY TABLE to_query_FileIDs"
|
|
772
|
+
returnValueOrRaise(self._update(sqlCmd, conn=connection))
|
|
728
773
|
|
|
729
774
|
def __insertExistingTransformationFiles(self, transID, fileTuplesList, connection=False):
|
|
730
775
|
"""Inserting already transformation files in TransformationFiles table (e.g. for deriving transformations)"""
|
|
@@ -1271,18 +1316,35 @@ class TransformationDB(DB):
|
|
|
1271
1316
|
# These methods manipulate the DataFiles table
|
|
1272
1317
|
#
|
|
1273
1318
|
|
|
1319
|
+
@convertToReturnValue
|
|
1274
1320
|
def __getFileIDsForLfns(self, lfns, connection=False):
|
|
1275
1321
|
"""Get file IDs for the given list of lfns
|
|
1276
1322
|
warning: if the file is not present, we'll see no errors
|
|
1277
1323
|
"""
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1324
|
+
|
|
1325
|
+
if not lfns:
|
|
1326
|
+
return ({}, {})
|
|
1327
|
+
# Create temporary table for LFNs
|
|
1328
|
+
sqlCmd = "CREATE TEMPORARY TABLE to_query_LFNs (LFN VARCHAR(255) NOT NULL, PRIMARY KEY (LFN)) ENGINE=MEMORY;"
|
|
1329
|
+
returnValueOrRaise(self._update(sqlCmd, conn=connection))
|
|
1330
|
+
|
|
1331
|
+
try:
|
|
1332
|
+
# Insert LFNs into temporary table
|
|
1333
|
+
sqlCmd = "INSERT INTO to_query_LFNs (LFN) VALUES ( %s )"
|
|
1334
|
+
returnValueOrRaise(self._updatemany(sqlCmd, [(lfn,) for lfn in lfns], conn=connection))
|
|
1335
|
+
|
|
1336
|
+
# Query using JOIN with temporary table
|
|
1337
|
+
req = "SELECT df.LFN, df.FileID FROM DataFiles df JOIN to_query_LFNs t ON df.LFN = t.LFN;"
|
|
1338
|
+
res = returnValueOrRaise(self._query(req, conn=connection))
|
|
1339
|
+
|
|
1340
|
+
lfns = dict(res)
|
|
1341
|
+
# Reverse dictionary
|
|
1342
|
+
fids = {fileID: lfn for lfn, fileID in lfns.items()}
|
|
1343
|
+
return (fids, lfns)
|
|
1344
|
+
finally:
|
|
1345
|
+
# Clean up temporary table
|
|
1346
|
+
sqlCmd = "DROP TEMPORARY TABLE to_query_LFNs"
|
|
1347
|
+
self._update(sqlCmd, conn=connection)
|
|
1286
1348
|
|
|
1287
1349
|
def __getLfnsForFileIDs(self, fileIDs, connection=False):
|
|
1288
1350
|
"""Get lfns for the given list of fileIDs"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DIRAC
|
|
3
|
-
Version: 9.0.
|
|
3
|
+
Version: 9.0.10
|
|
4
4
|
Summary: DIRAC is an interware, meaning a software framework for distributed computing.
|
|
5
5
|
Home-page: https://github.com/DIRACGrid/DIRAC/
|
|
6
6
|
License: GPL-3.0-only
|
|
@@ -19,7 +19,7 @@ Requires-Dist: cachetools
|
|
|
19
19
|
Requires-Dist: certifi
|
|
20
20
|
Requires-Dist: cwltool
|
|
21
21
|
Requires-Dist: diraccfg
|
|
22
|
-
Requires-Dist: DIRACCommon==v9.0.
|
|
22
|
+
Requires-Dist: DIRACCommon==v9.0.10
|
|
23
23
|
Requires-Dist: diracx-client>=v0.0.1
|
|
24
24
|
Requires-Dist: diracx-core>=v0.0.1
|
|
25
25
|
Requires-Dist: diracx-cli>=v0.0.1
|
|
@@ -231,7 +231,7 @@ DIRAC/Core/Utilities/Devloader.py,sha256=nPEinBId-NzyG1zcjcnUQOO-pWmNJsmWkj-Xkt5
|
|
|
231
231
|
DIRAC/Core/Utilities/DictCache.py,sha256=8Yo5RJnTKwL8NO960hnbNgrzGCnd-Iupk6JExoFFYxQ,12661
|
|
232
232
|
DIRAC/Core/Utilities/Dictionaries.py,sha256=yYxhB0lycfU2rDxgvviqqPpEsaVxNPNS8ZlulHG1LLw,549
|
|
233
233
|
DIRAC/Core/Utilities/DirectoryExplorer.py,sha256=t8__3M_1zparfvKbB_fR8hIB56mZtmBPgklm5FTxYFA,1212
|
|
234
|
-
DIRAC/Core/Utilities/ElasticSearchDB.py,sha256=
|
|
234
|
+
DIRAC/Core/Utilities/ElasticSearchDB.py,sha256=Kr4hmm5PbsGpEdeQ1GgjkRM9m7evCB9yR4BNgWxCiMQ,22735
|
|
235
235
|
DIRAC/Core/Utilities/EventDispatcher.py,sha256=wL2jA2gFRrzMPORJ10WEQloxZPNdcfDjGHq8ENDJ86Y,3142
|
|
236
236
|
DIRAC/Core/Utilities/ExecutorDispatcher.py,sha256=npBVxBxKNmSDklJIfUMv-eadHO3oHbaASGoFZp54A0o,28893
|
|
237
237
|
DIRAC/Core/Utilities/Extensions.py,sha256=k0kgUjc50oFZ1e2XwOERJLQMSSCbnx3HwBO_xFTffSU,7535
|
|
@@ -361,7 +361,7 @@ DIRAC/DataManagementSystem/Agent/RequestOperations/test/Test_ReplicateAndRegiste
|
|
|
361
361
|
DIRAC/DataManagementSystem/Agent/RequestOperations/test/Test_RequestOperations.py,sha256=3XZCrFdp7Yk5oY9xlaL2itErA9xmNnCJgIIZ38FOiK0,8292
|
|
362
362
|
DIRAC/DataManagementSystem/Client/ConsistencyInspector.py,sha256=dtKNfsVNud9x7aVzr-RI1jQZCqbEqgmaHmE5lxm7Qwo,31227
|
|
363
363
|
DIRAC/DataManagementSystem/Client/DataIntegrityClient.py,sha256=2ug49tvNzEp1GO6nzcW42E43qPXnaJF-mpIVp1TkWFQ,9130
|
|
364
|
-
DIRAC/DataManagementSystem/Client/DataManager.py,sha256=
|
|
364
|
+
DIRAC/DataManagementSystem/Client/DataManager.py,sha256=ME5a_0csev0X07PVXQV14BrDrvCfOhPWCWAwlcbrK60,82313
|
|
365
365
|
DIRAC/DataManagementSystem/Client/DirectoryListing.py,sha256=CvQZ5Da5WhgwdDL8iLk0xVBjKZrBHTdwMKWwSJwzwEI,7582
|
|
366
366
|
DIRAC/DataManagementSystem/Client/FTS3Client.py,sha256=Kk1wy4YnkYuOI6IltyDYZqkzxV7Zsf7ZuoKT12_VbTw,3531
|
|
367
367
|
DIRAC/DataManagementSystem/Client/FTS3File.py,sha256=gZFN_Uxc2tblUCETb4qWPJ2M1tSmKUvTMiZUL-yJ6M0,3122
|
|
@@ -604,7 +604,7 @@ DIRAC/Interfaces/API/test/testWF.jdl,sha256=byby75rpCSYh2FuSqqMP1YALbEcpo7ix6U4x
|
|
|
604
604
|
DIRAC/Interfaces/API/test/testWF.xml,sha256=PIUoxu00j3OAB8Wcx4Uf_vPpxniO6jMUJgEib9IkeIQ,4452
|
|
605
605
|
DIRAC/Interfaces/API/test/testWFSIO.jdl,sha256=dNZbBaYcz7wnzxrSML7DvpQYxO7kqUd5FmmIj6ijV5U,420
|
|
606
606
|
DIRAC/Interfaces/Utilities/DCommands.py,sha256=qcto59gNjD_Mg2bWYqorxgv3S2K91S5f0dLGxxkEZXc,21265
|
|
607
|
-
DIRAC/Interfaces/Utilities/DConfigCache.py,sha256=
|
|
607
|
+
DIRAC/Interfaces/Utilities/DConfigCache.py,sha256=tDiRio3wyvGRRKAJj-4BL8ZbYBhoW5q8SKJ928Uu3uE,2684
|
|
608
608
|
DIRAC/Interfaces/scripts/__init__.py,sha256=bqdOR5-0t1MOV62P-oehaZd_d9YjGSWVTfW-gRXMqLg,44
|
|
609
609
|
DIRAC/Interfaces/scripts/dcd.py,sha256=b5Yoc2amdnv-Aotujir4XlFrVVY7ASaxLzRAU02j63Y,1317
|
|
610
610
|
DIRAC/Interfaces/scripts/dchgrp.py,sha256=0pFrWpppC9ktPlXRqcSSN_23tQR1gdB9JrTKBdQw2_Y,1692
|
|
@@ -1047,15 +1047,15 @@ DIRAC/StorageManagementSystem/scripts/dirac_stager_stage_files.py,sha256=zgOaJ6P
|
|
|
1047
1047
|
DIRAC/TransformationSystem/ConfigTemplate.cfg,sha256=qm3MaoyX_zjhDGFG4NcAFBKLniWBaPcSkEZCKebYeh4,6730
|
|
1048
1048
|
DIRAC/TransformationSystem/__init__.py,sha256=KTlQaDBvpqTf0WxwbYIOSppNJ34WZkbaTG1XBWEBvN0,43
|
|
1049
1049
|
DIRAC/TransformationSystem/Agent/DataRecoveryAgent.py,sha256=JUfOBQd0U2uz9WvvArBRurgxyoVlBbg3rL5ZgdYs0Vw,26982
|
|
1050
|
-
DIRAC/TransformationSystem/Agent/InputDataAgent.py,sha256=
|
|
1051
|
-
DIRAC/TransformationSystem/Agent/MCExtensionAgent.py,sha256=
|
|
1050
|
+
DIRAC/TransformationSystem/Agent/InputDataAgent.py,sha256=XytU-0aq0RJZhNNXxzvvn-AXsRBjt20Q3miFl5LBbYo,8177
|
|
1051
|
+
DIRAC/TransformationSystem/Agent/MCExtensionAgent.py,sha256=KXBgn_5r7oVIOX0d7gx5ok__sCxk4esJ8dX7hivS7C4,5338
|
|
1052
1052
|
DIRAC/TransformationSystem/Agent/RequestTaskAgent.py,sha256=0FxuRVONDkC6DtDqfSC4LeZmheaevBsrh4yvan0DtVc,2689
|
|
1053
|
-
DIRAC/TransformationSystem/Agent/TaskManagerAgentBase.py,sha256=
|
|
1053
|
+
DIRAC/TransformationSystem/Agent/TaskManagerAgentBase.py,sha256=I1DGxItHZ_nYs1_cGZTTrsts01rQl2_JuBHtYTljTGw,30737
|
|
1054
1054
|
DIRAC/TransformationSystem/Agent/TransformationAgent.py,sha256=rUPyfX_Ip3ZUyBrmVBrYiddVmgeTx6gKiYPEzwUDOcY,33813
|
|
1055
1055
|
DIRAC/TransformationSystem/Agent/TransformationAgentsUtilities.py,sha256=XrgrjQWSDQm0uxG-wyEY-W0A_MBJyIE-22TafqrLP3A,2805
|
|
1056
|
-
DIRAC/TransformationSystem/Agent/TransformationCleaningAgent.py,sha256=
|
|
1056
|
+
DIRAC/TransformationSystem/Agent/TransformationCleaningAgent.py,sha256=FyEOWtp8_ZIMCEh1RYqLOENnB--unmKy6gmZkgLb7cM,33251
|
|
1057
1057
|
DIRAC/TransformationSystem/Agent/TransformationPlugin.py,sha256=EpWil1Bla9xdrJkhj61oUFDpGzyWfC8acW3tjBh5JpQ,11322
|
|
1058
|
-
DIRAC/TransformationSystem/Agent/ValidateOutputDataAgent.py,sha256=
|
|
1058
|
+
DIRAC/TransformationSystem/Agent/ValidateOutputDataAgent.py,sha256=YzjUVECnWYvJ2zQyqMqRa4BZLqq2FUulXnI4tO6HlpU,10190
|
|
1059
1059
|
DIRAC/TransformationSystem/Agent/WorkflowTaskAgent.py,sha256=UBNVVx0ZgiFnzAPCNC1dSuJXKkt2pPfpSqhy0CREFlg,1741
|
|
1060
1060
|
DIRAC/TransformationSystem/Agent/__init__.py,sha256=g5D8rYLJboNfnLrH_MZmfyvrXhp0pZBjBTtmr9ZJBQw,49
|
|
1061
1061
|
DIRAC/TransformationSystem/Agent/RequestOperations/SetFileStatus.py,sha256=asFCK8oxR-p4AMEz6XdFBqft72xUzpqypBN57l_zOEc,1857
|
|
@@ -1069,7 +1069,7 @@ DIRAC/TransformationSystem/Client/TaskManager.py,sha256=lh3AsNh7Q-YXf7WCoywNAo1X
|
|
|
1069
1069
|
DIRAC/TransformationSystem/Client/TaskManagerPlugin.py,sha256=mCTiFmqs7IpbDcF9wzfoRSMeuWMsxI4LcZr_9u2vr-c,5528
|
|
1070
1070
|
DIRAC/TransformationSystem/Client/Transformation.py,sha256=Iw8Q4X8ZAUe4HlXAb8TKRvg4vVVnqoaINTAP_b2v7pI,26539
|
|
1071
1071
|
DIRAC/TransformationSystem/Client/TransformationCLI.py,sha256=EFAbksFDLjX92KcT6VZlriXwFBLjkkxWd0qVWEJPfjU,23972
|
|
1072
|
-
DIRAC/TransformationSystem/Client/TransformationClient.py,sha256=
|
|
1072
|
+
DIRAC/TransformationSystem/Client/TransformationClient.py,sha256=9fTV7qvhyaiWCeR-faTpjPy4Vqw4wPuDtr7oFUECJmg,26667
|
|
1073
1073
|
DIRAC/TransformationSystem/Client/TransformationFilesStatus.py,sha256=3O89wYkPdvYPXnwxyM9x7QLcN6uODEV5yH76LFpmQ80,822
|
|
1074
1074
|
DIRAC/TransformationSystem/Client/TransformationStatus.py,sha256=f7lzca1m6AfGG09OkA9_bQUthUyojeurS_p02r2oXyQ,1411
|
|
1075
1075
|
DIRAC/TransformationSystem/Client/Utilities.py,sha256=OO2XBMYbFCpEs961k676WXDtn-tPUm7lQSxilUQhdiA,20369
|
|
@@ -1083,7 +1083,7 @@ DIRAC/TransformationSystem/Client/test/Test_Client_TaskManagerPlugin.py,sha256=0
|
|
|
1083
1083
|
DIRAC/TransformationSystem/Client/test/Test_Client_TransformationClient.py,sha256=e0O2BZ7xA7uMQDf-68MXxQBRvICiL4KTCcSpSZtpHZc,2577
|
|
1084
1084
|
DIRAC/TransformationSystem/Client/test/Test_Client_TransformationSystem.py,sha256=tADYLmibPoagAbhM_MToRjy8HHDBcR_6tHU7c3hquJY,13663
|
|
1085
1085
|
DIRAC/TransformationSystem/Client/test/Test_Client_WorkflowTasks.py,sha256=0BNNF17NduQIiQIbamuQuilY7bklS7trtKzGfMjc_Tk,6128
|
|
1086
|
-
DIRAC/TransformationSystem/DB/TransformationDB.py,sha256=
|
|
1086
|
+
DIRAC/TransformationSystem/DB/TransformationDB.py,sha256=i3cVrpi19nUTD0wZ6JT_S7AUIsUQ3SuutEUYFnhM1Fg,79576
|
|
1087
1087
|
DIRAC/TransformationSystem/DB/TransformationDB.sql,sha256=JfOfEj0s8q-qh6Nyg6_HrrWsvj3MVFd8zY9O2hf9YEg,6935
|
|
1088
1088
|
DIRAC/TransformationSystem/DB/__init__.py,sha256=EZ7harwr41I_3b8a_D7j4tHGFrHQYUWYfZqfD6tAEb4,46
|
|
1089
1089
|
DIRAC/TransformationSystem/Service/TornadoTransformationManagerHandler.py,sha256=yzNjl3kzFJ20zwI-QYtD0e-rila1Nu45IRp_BVVgols,342
|
|
@@ -1296,9 +1296,9 @@ DIRAC/tests/Workflow/Integration/exe-script.py,sha256=B_slYdTocEzqfQLRhwuPiLyYUn
|
|
|
1296
1296
|
DIRAC/tests/Workflow/Integration/helloWorld.py,sha256=tBgEHH3ZF7ZiTS57gtmm3DW-Qxgm_57HWHpM-Y8XSws,205
|
|
1297
1297
|
DIRAC/tests/Workflow/Regression/helloWorld.py,sha256=69eCgFuVSYo-mK3Dj2dw1c6g86sF5FksKCf8V2aGVoM,509
|
|
1298
1298
|
DIRAC/tests/Workflow/Regression/helloWorld.xml,sha256=xwydIcFTAHIX-YPfQfyxuQ7hzvIO3IhR3UAF7ORgkGg,5310
|
|
1299
|
-
dirac-9.0.
|
|
1300
|
-
dirac-9.0.
|
|
1301
|
-
dirac-9.0.
|
|
1302
|
-
dirac-9.0.
|
|
1303
|
-
dirac-9.0.
|
|
1304
|
-
dirac-9.0.
|
|
1299
|
+
dirac-9.0.10.dist-info/licenses/LICENSE,sha256=uyr4oV6jmjUeepXZPPjkJRwa5q5MrI7jqJz5sVXNblQ,32452
|
|
1300
|
+
dirac-9.0.10.dist-info/METADATA,sha256=2Pde9NbM-pbmGOY4PXnSp-C9eZYR-YnqbJ8ZmRqnxzQ,10018
|
|
1301
|
+
dirac-9.0.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1302
|
+
dirac-9.0.10.dist-info/entry_points.txt,sha256=hupzIL8aVmjK3nn7RLKdhcaiPmLOiD3Kulh3CSDHKmw,16492
|
|
1303
|
+
dirac-9.0.10.dist-info/top_level.txt,sha256=RISrnN9kb_mPqmVu8_o4jF-DSX8-h6AcgfkO9cgfkHA,6
|
|
1304
|
+
dirac-9.0.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|