Skip to content

Commit

Permalink
feat: removed unused JobDB.Jobs.JobSplitType column
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Jan 19, 2024
1 parent 175f987 commit 4f9ee7a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 16 deletions.
5 changes: 0 additions & 5 deletions src/DIRAC/Interfaces/scripts/dirac_wms_job_attributes.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/usr/bin/env python
########################################################################
# File : dirac-wms-job-attributes
# Author : Stuart Paterson
########################################################################
"""
Retrieve attributes associated with the given DIRAC job
Expand All @@ -16,7 +12,6 @@
'JobGroup': 'NoGroup',
'JobID': '1',
'JobName': 'DIRAC_vhamar_602138',
'JobSplitType': 'Single',
'JobType': 'normal',
'LastUpdateTime': '2011-02-14 11:28:11',
'MinorStatus': 'Execution Complete',
Expand Down
5 changes: 1 addition & 4 deletions src/DIRAC/WorkloadManagementSystem/Agent/OptimizerModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,6 @@ def sendAccountingRecord(self, job, msg, classAdJob):
userGroup = classAdJob.getAttributeString("OwnerGroup")
jobGroup = classAdJob.getAttributeString("JobGroup")
jobType = classAdJob.getAttributeString("JobType")
jobClass = "unknown"
if classAdJob.lookupAttribute("JobSplitType"):
jobClass = classAdJob.getAttributeString("JobSplitType")
inputData = []
processingType = "unknown"
if classAdJob.lookupAttribute("ProcessingType"):
Expand All @@ -297,7 +294,7 @@ def sendAccountingRecord(self, job, msg, classAdJob):
"UserGroup": userGroup,
"JobGroup": jobGroup,
"JobType": jobType,
"JobClass": jobClass,
"JobClass": "unknown",
"ProcessingType": processingType,
"FinalMajorStatus": self.failedStatus,
"FinalMinorStatus": msg,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def _sendAccounting(self, jobID):
"UserGroup": jobDict["OwnerGroup"],
"JobGroup": jobDict["JobGroup"],
"JobType": jobDict["JobType"],
"JobClass": jobDict["JobSplitType"],
"JobClass": "unknown",
"ProcessingType": processingType,
"FinalMajorStatus": JobStatus.FAILED,
"FinalMinorStatus": JobMinorStatus.STALLED_PILOT_NOT_RUNNING,
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/WorkloadManagementSystem/DB/JobDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ def setJobCommandStatus(self, jobID, command, status):
def getSummarySnapshot(self, requestedFields=False):
"""Get the summary snapshot for a given combination"""
if not requestedFields:
requestedFields = ["Status", "MinorStatus", "Site", "Owner", "OwnerGroup", "JobGroup", "JobSplitType"]
requestedFields = ["Status", "MinorStatus", "Site", "Owner", "OwnerGroup", "JobGroup"]
valueFields = ["COUNT(JobID)", "SUM(RescheduleCounter)"]
defString = ", ".join(requestedFields)
valueString = ", ".join(valueFields)
Expand Down
2 changes: 0 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/DB/JobDB.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ CREATE TABLE `Jobs` (
`JobID` INT(11) UNSIGNED NOT NULL DEFAULT 0,
`JobType` VARCHAR(32) NOT NULL DEFAULT 'user',
`JobGroup` VARCHAR(32) NOT NULL DEFAULT '00000000',
`JobSplitType` ENUM('Single','Master','Subjob','DAGNode') NOT NULL DEFAULT 'Single',
`Site` VARCHAR(100) NOT NULL DEFAULT 'ANY',
`JobName` VARCHAR(128) NOT NULL DEFAULT 'Unknown',
`Owner` VARCHAR(64) NOT NULL DEFAULT 'Unknown',
Expand All @@ -59,7 +58,6 @@ CREATE TABLE `Jobs` (
FOREIGN KEY (`JobID`) REFERENCES `JobJDLs`(`JobID`),
KEY `JobType` (`JobType`),
KEY `JobGroup` (`JobGroup`),
KEY `JobSplitType` (`JobSplitType`),
KEY `Site` (`Site`),
KEY `Owner` (`Owner`),
KEY `OwnerGroup` (`OwnerGroup`),
Expand Down
4 changes: 1 addition & 3 deletions src/DIRAC/WorkloadManagementSystem/JobWrapper/JobWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def __init__(self, jobID=None, jobReport=None):
self.jobType = "unknown"
self.processingType = "unknown"
self.userGroup = "unknown"
self.jobClass = "unknown"
self.inputDataFiles = 0
self.outputDataFiles = 0
self.inputDataSize = 0
Expand Down Expand Up @@ -201,7 +200,6 @@ def initialize(self, arguments):
self.outputDataFiles = len(dataParam)
self.processingType = self.jobArgs.get("ProcessingType", self.processingType)
self.userGroup = self.jobArgs.get("OwnerGroup", self.userGroup)
self.jobClass = self.jobArgs.get("JobSplitType", self.jobClass)

if not self.cpuNormalizationFactor:
self.cpuNormalizationFactor = float(self.ceArgs.get("CPUNormalizationFactor", self.cpuNormalizationFactor))
Expand Down Expand Up @@ -1259,7 +1257,7 @@ def sendJobAccounting(self, status="", minorStatus=""):
"UserGroup": self.userGroup,
"JobGroup": self.jobGroup,
"JobType": self.jobType,
"JobClass": self.jobClass,
"JobClass": "unknown",
"ProcessingType": self.processingType,
"Site": self.siteName,
"FinalMajorStatus": self.wmsMajorStatus,
Expand Down

0 comments on commit 4f9ee7a

Please sign in to comment.