Example #1
0
    def __init__(self,
                 spec=None,
                 owner="unknown",
                 dn="unknown",
                 group="unknown",
                 owner_vogroup="DEFAULT",
                 owner_vorole="DEFAULT",
                 name=None,
                 task=None,
                 wfType=None,
                 id=-1,
                 alternativeFilesetClose=False,
                 priority=None):
        WMBSBase.__init__(self)
        WMWorkflow.__init__(self,
                            spec=spec,
                            owner=owner,
                            dn=dn,
                            group=group,
                            owner_vogroup=owner_vogroup,
                            owner_vorole=owner_vorole,
                            name=name,
                            task=task,
                            wfType=wfType,
                            priority=priority)

        if self.dn == "unknown":
            self.dn = owner

        self.id = id
        self.alternativeFilesetClose = alternativeFilesetClose
        return
Example #2
0
    def __init__(self,
                 lfn="",
                 id=-1,
                 size=0,
                 events=0,
                 checksums={},
                 parents=None,
                 locations=None,
                 first_event=0,
                 last_event=0,
                 merged=True):
        WMBSBase.__init__(self)
        WMFile.__init__(self,
                        lfn=lfn,
                        size=size,
                        events=events,
                        checksums=checksums,
                        parents=parents,
                        merged=merged)

        if locations is None:
            self.setdefault("newlocations", set())
        else:
            if isinstance(locations, str):
                self.setdefault("newlocations", set())
                self['newlocations'].add(locations)
            else:
                self.setdefault("newlocations", locations)

        # overwrite the default value set from the WMFile
        self["first_event"] = first_event
        self["last_event"] = last_event
        self.setdefault("id", id)
        self['locations'] = set()
Example #3
0
    def __init__(self, lfn = None, id = -1, size = None,
                 events = None, checksums = {}, parents = None, locations = None,
                 status = "NOTUPLOADED"):
        WMBSBase.__init__(self)
        WMFile.__init__(self, lfn = lfn, size = size, events = events,
                        checksums = checksums, parents = parents, merged = True)
        self.setdefault("status", status)
        self.setdefault("id", id)

        # Parameters for the algorithm
        self.setdefault("appName", None)
        self.setdefault("appVer", None)
        self.setdefault("appFam", None)
        self.setdefault("psetHash", None)
        self.setdefault("configContent", None)
        self.setdefault("datasetPath", None)
        self.setdefault("valid_status", None)

        if locations == None:
            self.setdefault("newlocations", set())
        else:
            self.setdefault("newlocations", self.makeset(locations))

        # The WMBS base class creates a DAO factory for WMBS, we'll need to
        # overwrite that so we can use the factory for DBSBuffer objects.
        self.daoFactory = DAOFactory(package = "WMComponent.DBSBuffer.Database",
                                     logger = self.logger,
                                     dbinterface = self.dbi)

        #Remove reference to WMBS daofactory to prevent confusion
        self.daofactory = self.daoFactory
        return
Example #4
0
    def __init__(self,
                 fileset=None,
                 workflow=None,
                 id=-1,
                 split_algo="FileBased",
                 type="Processing"):
        WMBSBase.__init__(self)

        # If a fileset or workflow isn't passed in the base class will create
        # empty non-WMBS filesets and workflows.  We want WMBS filesets and
        # workflows so we'll create those here.
        if fileset == None:
            fileset = Fileset()
        if workflow == None:
            workflow = Workflow()

        WMSubscription.__init__(self,
                                fileset=fileset,
                                workflow=workflow,
                                split_algo=split_algo,
                                type=type)

        self.setdefault("id", id)

        self.bulkDeleteLimit = 500
        return
Example #5
0
    def __init__(
        self,
        spec=None,
        owner="unknown",
        dn="unknown",
        group="unknown",
        owner_vogroup="DEFAULT",
        owner_vorole="DEFAULT",
        name=None,
        task=None,
        wfType=None,
        id=-1,
    ):
        WMBSBase.__init__(self)
        WMWorkflow.__init__(
            self,
            spec=spec,
            owner=owner,
            dn=dn,
            group=group,
            owner_vogroup=owner_vogroup,
            owner_vorole=owner_vorole,
            name=name,
            task=task,
            wfType=wfType,
        )

        if self.dn == "unknown":
            self.dn = owner

        self.id = id
        return
Example #6
0
    def __init__(self, lfn = None, id = -1, size = None,
                 events = None, checksums = {}, parents = None, locations = None,
                 status = "NOTUPLOADED"):
        WMBSBase.__init__(self)
        WMFile.__init__(self, lfn = lfn, size = size, events = events,
                        checksums = checksums, parents = parents, merged = True)
        self.setdefault("status", status)
        self.setdefault("id", id)

        # Parameters for the algorithm
        self.setdefault("appName", None)
        self.setdefault("appVer", None)
        self.setdefault("appFam", None)
        self.setdefault("psetHash", None)
        self.setdefault("configContent", None)
        self.setdefault("datasetPath", None)
        self.setdefault("valid_status", None)

        if locations == None:
            self.setdefault("newlocations", set())
        else:
            self.setdefault("newlocations", self.makeset(locations))

        # The WMBS base class creates a DAO factory for WMBS, we'll need to
        # overwrite that so we can use the factory for DBSBuffer objects.
        self.daoFactory = DAOFactory(package = "WMComponent.DBSBuffer.Database",
                                     logger = self.logger,
                                     dbinterface = self.dbi)

        #Remove reference to WMBS daofactory to prevent confusion
        self.daofactory = self.daoFactory
        return
Example #7
0
    def __init__(self, subscription = None, jobs = None, id = -1, uid = None, location = None):
        WMBSBase.__init__(self)
        WMJobGroup.__init__(self, subscription=subscription, jobs = jobs)

        self.id = id
        self.lastUpdate = None
        self.uid = uid

        if location != None:
            self.setSite(location)

        return
Example #8
0
    def __init__(self,
                 lfn=None,
                 id=-1,
                 size=None,
                 events=None,
                 checksums=None,
                 parents=None,
                 locations=None,
                 status="NOTUPLOADED",
                 inPhedex=0,
                 workflowId=None,
                 prep_id=None):

        checksums = checksums or {}
        WMBSBase.__init__(self)
        WMFile.__init__(self,
                        lfn=lfn,
                        size=size,
                        events=events,
                        checksums=checksums,
                        parents=parents,
                        merged=True)
        self.setdefault("status", status)
        self.setdefault("in_phedex", inPhedex)
        self.setdefault("id", id)
        self.setdefault("workflowId", workflowId)

        # Parameters for the algorithm
        self.setdefault("appName", None)
        self.setdefault("appVer", None)
        self.setdefault("appFam", None)
        self.setdefault("psetHash", None)
        self.setdefault("configContent", None)
        self.setdefault("datasetPath", None)
        self.setdefault("processingVer", None)
        self.setdefault("acquisitionEra", None)
        self.setdefault("validStatus", None)
        self.setdefault("globalTag", None)
        self.setdefault("datasetParent", None)
        self.setdefault("prep_id", None)

        if locations is None:
            self.setdefault("newlocations", set())
        else:
            self.setdefault("newlocations", self.makeset(locations))

        # The WMBS base class creates a DAO factory for WMBS, we'll need to
        # overwrite that so we can use the factory for DBSBuffer objects.
        self.daofactory = DAOFactory(package="WMComponent.DBS3Buffer",
                                     logger=self.logger,
                                     dbinterface=self.dbi)

        return
Example #9
0
    def __init__(self, spec = None, owner = None, dn = None, group = None,
                 owner_vogroup = '', owner_vorole = '',
                 name = None, task = None, wfType = None, id = -1):
        WMBSBase.__init__(self)
        WMWorkflow.__init__(self, spec = spec, owner = owner, dn = dn,
                            group = group, owner_vogroup = owner_vogroup,
                            owner_vorole = owner_vorole, name = name,
                            task = task, wfType = wfType)

        if not self.dn: self.dn = owner
        self.id = id
        return
Example #10
0
    def __init__(self, name=None, id=-1, is_open=True, files=None,
                 parents=None, parents_open=True, source=None, sourceUrl=None):
        WMBSBase.__init__(self)
        WMFileset.__init__(self, name = name, files=files)

        if parents == None:
            parents = set()

        # Create a new fileset
        self.id = id
        self.open = is_open
        self.parents = parents
        self.setParentage(parents, parents_open)
        self.source = source
        self.sourceUrl = sourceUrl
        self.lastUpdate = 0
Example #11
0
    def __init__(self, spec = None, owner = "unknown", dn = "unknown",
                 group = "unknown", owner_vogroup = "DEFAULT",
                 owner_vorole = "DEFAULT", name = None, task = None,
                 wfType = None, id = -1, alternativeFilesetClose = False):
        WMBSBase.__init__(self)
        WMWorkflow.__init__(self, spec = spec, owner = owner, dn = dn,
                            group = group, owner_vogroup = owner_vogroup,
                            owner_vorole = owner_vorole, name = name,
                            task = task, wfType = wfType)

        if self.dn == "unknown":
            self.dn = owner

        self.id = id
        self.alternativeFilesetClose = alternativeFilesetClose
        return
Example #12
0
    def __init__(self, name=None, id=-1, is_open=True, files=None, 
                 parents=None, parents_open=True, source=None, sourceUrl=None):
        WMBSBase.__init__(self)
        WMFileset.__init__(self, name = name, files=files)

        if parents == None:
            parents = set()
        
        # Create a new fileset
        self.id = id
        self.open = is_open
        self.parents = parents
        self.setParentage(parents, parents_open)
        self.source = source
        self.sourceUrl = sourceUrl 
        self.lastUpdate = 0
Example #13
0
    def __init__(self,
                 subscription=None,
                 jobs=None,
                 id=-1,
                 uid=None,
                 location=None):
        WMBSBase.__init__(self)
        WMJobGroup.__init__(self, subscription=subscription, jobs=jobs)

        self.id = id
        self.lastUpdate = None
        self.uid = uid

        if location != None:
            self.setSite(location)

        return
Example #14
0
    def __init__(self, fileset = None, workflow = None, id = -1,
                 split_algo = "FileBased", type = "Processing"):
        WMBSBase.__init__(self)

        # If a fileset or workflow isn't passed in the base class will create
        # empty non-WMBS filesets and workflows.  We want WMBS filesets and
        # workflows so we'll create those here.
        if fileset == None:
            fileset = Fileset()
        if workflow == None:
            workflow = Workflow()
            
        WMSubscription.__init__(self, fileset = fileset, workflow = workflow,
                                split_algo = split_algo, type = type)

        self.setdefault("id", id)

        self.bulkDeleteLimit = 500
        return
Example #15
0
    def __init__(self, name = None, files = None, id = None):
        """
        ___init___

        jobgroup object is used to determine the workflow.
        inputFiles is a list of files that the job will process.
        """
        WMBSBase.__init__(self)
        WMJob.__init__(self, name = name, files = files)

        self["id"]           = id
        self["jobgroup"]     = None
        self["couch_record"] = None
        self["attachments"]  = {}
        self["cache_dir"]    = None
        self["sandbox"]      = None
        self['fwjr']         = None
        self["mask"]         = Mask()
        self['custom']       = {}  # For local add-ons that we want to send to JSON

        return
Example #16
0
    def __init__(self, name=None, files=None, id=None):
        """
        ___init___

        jobgroup object is used to determine the workflow.
        inputFiles is a list of files that the job will process.
        """
        WMBSBase.__init__(self)
        WMJob.__init__(self, name=name, files=files)

        self["id"] = id
        self["jobgroup"] = None
        self["couch_record"] = None
        self["attachments"] = {}
        self["cache_dir"] = None
        self["sandbox"] = None
        self['fwjr'] = None
        self["mask"] = Mask()
        self['custom'] = {}  # For local add-ons that we want to send to JSON

        return
Example #17
0
    def __init__(self, lfn = "", id = -1, size = 0, events = 0, checksums = {},
                 parents = None, locations = None, first_event = 0,
                 last_event = 0, merged = True):
        WMBSBase.__init__(self)
        WMFile.__init__(self, lfn = lfn, size = size, events = events,
                        checksums = checksums, parents = parents, merged = merged)

        if locations == None:
            self.setdefault("newlocations", set())
        else:
            if type(locations) == str:
                self.setdefault("newlocations", set())
                self['newlocations'].add(locations)
            else:
                self.setdefault("newlocations", locations)

        # overwrite the default value set from the WMFile
        self["first_event"] =  first_event
        self["last_event"] = last_event
        self.setdefault("id", id)
        self['locations'] = set()
Example #18
0
    def __init__(self, lfn=None, id=-1, size=None,
                 events=None, checksums=None, parents=None, locations=None,
                 status="NOTUPLOADED", inPhedex=0, workflowId=None, prep_id=None):

        checksums = checksums or {}
        WMBSBase.__init__(self)
        WMFile.__init__(self, lfn=lfn, size=size, events=events,
                        checksums=checksums, parents=parents, merged=True)
        self.setdefault("status", status)
        self.setdefault("in_phedex", inPhedex)
        self.setdefault("id", id)
        self.setdefault("workflowId", workflowId)

        # Parameters for the algorithm
        self.setdefault("appName", None)
        self.setdefault("appVer", None)
        self.setdefault("appFam", None)
        self.setdefault("psetHash", None)
        self.setdefault("configContent", None)
        self.setdefault("datasetPath", None)
        self.setdefault("processingVer", None)
        self.setdefault("acquisitionEra", None)
        self.setdefault("validStatus", None)
        self.setdefault("globalTag", None)
        self.setdefault("datasetParent", None)
        self.setdefault("prep_id", None)

        if locations is None:
            self.setdefault("newlocations", set())
        else:
            self.setdefault("newlocations", self.makeset(locations))

        # The WMBS base class creates a DAO factory for WMBS, we'll need to
        # overwrite that so we can use the factory for DBSBuffer objects.
        self.daofactory = DAOFactory(package="WMComponent.DBS3Buffer",
                                     logger=self.logger,
                                     dbinterface=self.dbi)

        return
Example #19
0
 def __init__(self,
              wuid=None,
              taskID=None,
              retryCount=0,
              lastUnitCount=None,
              lastSubmitTime=int(time.time()),
              status=0,
              firstEvent=1,
              lastEvent=MAX_EVENT,
              fileid=None,
              runLumi=None):
     WMBSBase.__init__(self)
     DSWorkUnit.__init__(self,
                         taskID=taskID,
                         retryCount=retryCount,
                         lastUnitCount=lastUnitCount,
                         lastSubmitTime=lastSubmitTime,
                         status=status,
                         firstEvent=firstEvent,
                         lastEvent=lastEvent,
                         fileid=fileid,
                         runLumi=runLumi)
     self.setdefault('id', wuid)
Example #20
0
    def __init__(self):
        WMMask.__init__(self)
        WMBSBase.__init__(self)


        return
Example #21
0
    def __init__(self):
        WMMask.__init__(self)
        WMBSBase.__init__(self)


        return