当前位置: 首页>>代码示例>>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;未经允许,请勿转载。