當前位置: 首頁>>代碼示例>>Python>>正文


Python Client.addDatasetsToContainer方法代碼示例

本文整理匯總了Python中pandatools.Client.addDatasetsToContainer方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.addDatasetsToContainer方法的具體用法?Python Client.addDatasetsToContainer怎麽用?Python Client.addDatasetsToContainer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pandatools.Client的用法示例。


在下文中一共展示了Client.addDatasetsToContainer方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: addDatasetsToContainer

# 需要導入模塊: from pandatools import Client [as 別名]
# 或者: from pandatools.Client import addDatasetsToContainer [as 別名]
def addDatasetsToContainer(container, datasets):
    from pandatools import Client

    # HC datasets don't use containers
    if not configPanda["processingType"].startswith("gangarobot") and not configPanda["processingType"].startswith(
        "hammercloud"
    ):
        Client.addDatasetsToContainer(container, datasets, False)
開發者ID:kreczko,項目名稱:ganga,代碼行數:10,代碼來源:AthenaJediRTHandler.py

示例2: retry

# 需要導入模塊: from pandatools import Client [as 別名]
# 或者: from pandatools.Client import addDatasetsToContainer [as 別名]

#.........這裏部分代碼省略.........
             newOpts['provenanceID'] = retryJobs[0].jobExecutionID
             newOpts['panda_parentJobsetID'] = retryJobs[0].sourceSite
             tmpLog.info("Constructing job spec again to be sent to another site ...")
             comStat= PsubUtils.execWithModifiedParams(retryJobs,newOpts,self.verbose,newSite)
             if comStat == 0:
                 # update database
                 time.sleep(2)
                 self.sync()
             else:
                 tmpLog.error("Failed to submit jobs to Panda server")                
             return
         # register datasets
         tmpOutDsLocation = Client.PandaSites[retryJobs[-1].computingSite]['ddm']
         addedDataset = []
         shadowDSname = None
         for tmpFile in retryJobs[-1].Files:
             if tmpFile.type in ['output','log'] and tmpFile.dataset.endswith('/'):
                 # add shadow
                 """
                 removed shadow
                 if shadowDSname == None and tmpFile.type == 'log':
                     shadowDSname = "%s%s" % (tmpFile.destinationDBlock,Client.suffixShadow)
                     Client.addDataset(shadowDSname,self.verbose)
                 """    
                 # add datasets    
                 if not tmpFile.destinationDBlock in addedDataset:
                     # create dataset
                     Client.addDataset(
                             tmpFile.destinationDBlock,
                             self.verbose,
                             location=tmpOutDsLocation,
                             dsCheck=False)
                     # add to container
                     Client.addDatasetsToContainer(
                             tmpFile.dataset,
                             [tmpFile.destinationDBlock],
                             self.verbose)
                     # append
                     addedDataset.append(tmpFile.destinationDBlock)
         # register libDS
         if retryBuild and newLibDS != None:
             Client.addDataset(
                     newLibDS,
                     self.verbose,
                     location=tmpOutDsLocation,
                     dsCheck=False)
         # submit
         tmpLog.info("Submitting job ...")            
         status,out = Client.submitJobs(retryJobs,verbose=self.verbose)
         if out == None or status != 0:
             tmpLog.error(status)
             tmpLog.error(out)
             tmpLog.error("Failed to submit jobs to Panda server")
             return
         # update database
         pandaIDstatus = {}
         newJobID = None
         for items in out:
             # get newJobID
             if newJobID == None:
                 newJobID = items[1]
             # check PandaID
             PandaID = items[0]
             if PandaID == 'NULL':
                 tmpLog.error("Panda server returned wrong IDs. It may have a temporary problem")
                 return
開發者ID:PanDAWMS,項目名稱:panda-client,代碼行數:70,代碼來源:PBookCore.py


注:本文中的pandatools.Client.addDatasetsToContainer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。