当前位置: 首页>>代码示例>>Python>>正文


Python RedisCoordinationAdaptor.update_pd方法代码示例

本文整理汇总了Python中pilot.coordination.redis_adaptor.RedisCoordinationAdaptor.update_pd方法的典型用法代码示例。如果您正苦于以下问题:Python RedisCoordinationAdaptor.update_pd方法的具体用法?Python RedisCoordinationAdaptor.update_pd怎么用?Python RedisCoordinationAdaptor.update_pd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pilot.coordination.redis_adaptor.RedisCoordinationAdaptor的用法示例。


在下文中一共展示了RedisCoordinationAdaptor.update_pd方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: put_du

# 需要导入模块: from pilot.coordination.redis_adaptor import RedisCoordinationAdaptor [as 别名]
# 或者: from pilot.coordination.redis_adaptor.RedisCoordinationAdaptor import update_pd [as 别名]
 def put_du(self, du):
     """Copy Data Unit to Pilot Data"""
     logger.debug("Put DU: %s to Pilot-Data: %s"%(du.id,self.service_url))
     self.__filemanager.create_du(du.id)
     self.__filemanager.put_du(du)
     self.data_unit_urls.append(du.get_url())
     CoordinationAdaptor.update_pd(self)
开发者ID:ashleyz,项目名称:BigJob,代码行数:9,代码来源:pilotdata_manager.py

示例2: copy_du

# 需要导入模块: from pilot.coordination.redis_adaptor import RedisCoordinationAdaptor [as 别名]
# 或者: from pilot.coordination.redis_adaptor.RedisCoordinationAdaptor import update_pd [as 别名]
 def copy_du(self, du, pd_new):
     """ Copy DataUnit to another Pilot Data """
     pd_new.create_du(du)
     self.__filemanager.copy_du(du, pd_new)
     
     # update meta data at pd_new
     #pd_new.data_units[du.id] = du
     pd_new.data_unit_urls.append(du.get_url())
     CoordinationAdaptor.update_pd(pd_new)
开发者ID:ashleyz,项目名称:BigJob,代码行数:11,代码来源:pilotdata_manager.py

示例3: __init__

# 需要导入模块: from pilot.coordination.redis_adaptor import RedisCoordinationAdaptor [as 别名]
# 或者: from pilot.coordination.redis_adaptor.RedisCoordinationAdaptor import update_pd [as 别名]
    def __init__(self, pilot_data_service=None, pilot_data_description=None, pd_url=None):
        """ 
            Initialize PilotData at given service url::
            
                ssh://<hostname>
                gsissh://<hostname>
                go://<hostname>
                gs://google.com
                s3://aws.amazon.com
            
            In the future more SAGA/Bliss URL schemes/adaptors are supported.        
        """
        self.id = None
        self.url = pd_url
        self.pilot_data_description = None
        self.pilot_data_service = pilot_data_service
        self.service_url = None
        self.size = None
        self.data_unit_urls = []
        self.security_context = None

        if pd_url == None and pilot_data_service != None:  # new pd
            self.id = self.PD_ID_PREFIX + str(uuid.uuid1())
            self.pilot_data_description = pilot_data_description
            self.url = CoordinationAdaptor.add_pd(
                CoordinationAdaptor.get_base_url(application_id) + ":" + pilot_data_service.id, self
            )
        elif pd_url != None:
            logger.warn("Reconnect to PilotData: %s" % pd_url)
            dictionary = CoordinationAdaptor.get_pd(pd_url)
            if dictionary.has_key("security_context"):
                self.security_context = dictionary["security_context"]
            pd_dict = eval(dictionary["pilot_data"])
            for i in pd_dict:
                self.__setattr__(i, pd_dict[i])
            # A Pilot Data does not hold a direct reference to a Data Unit (only URL refs are stored)
            self.data_unit_urls = eval(dictionary["data_unit_urls"])

        self.__initialize_pilot_data()
        CoordinationAdaptor.update_pd(self)
开发者ID:icheckmate,项目名称:BigJob,代码行数:42,代码来源:pilotdata_manager.py

示例4: remove_du

# 需要导入模块: from pilot.coordination.redis_adaptor import RedisCoordinationAdaptor [as 别名]
# 或者: from pilot.coordination.redis_adaptor.RedisCoordinationAdaptor import update_pd [as 别名]
 def remove_du(self, du):
     """ Remove Data Unit from Pilot Data """
     if self.data_unit_urls.count(du.get_url())>0:
         self.__filemanager.remove_du(du)
         self.data_unit_urls.remove(du.get_url())
     CoordinationAdaptor.update_pd(self)
开发者ID:ashleyz,项目名称:BigJob,代码行数:8,代码来源:pilotdata_manager.py


注:本文中的pilot.coordination.redis_adaptor.RedisCoordinationAdaptor.update_pd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。