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


Python MogamiLog.info方法代码示例

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


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

示例1: dataadd

# 需要导入模块: from system import MogamiLog [as 别名]
# 或者: from system.MogamiLog import info [as 别名]
 def dataadd(self, rootpath):
     ip = self.c_channel.getpeername()
     
     self.sysinfo.add_data_server(ip, rootpath)
     MogamiLog.info("delete data server IP: %s" % ip)
     MogamiLog.info("Now there are %d data servers." %
                    len(self.sysinfo.data_list))
开发者ID:nukamu,项目名称:gxp4,代码行数:9,代码来源:meta.py

示例2: __init__

# 需要导入模块: from system import MogamiLog [as 别名]
# 或者: from system.MogamiLog import info [as 别名]
    def __init__(self, metaaddr, rootpath):
        """This is the function of MogamiMeta's init.

        @param metaaddr ip address or hostname of metadata server
        @param rootpath path of directory to store data into
        """
        # basic information
        self.metaaddr = metaaddr
        self.rootpath = os.path.abspath(rootpath)
        self.filedict = MogamiLocalFileDict()

        # check directory for data files
        assert os.access(self.rootpath, os.R_OK and os.W_OK and os.X_OK)

        # Initialization of Log.
        MogamiLog.init(MogamiLog.TYPE_DATA, conf.data_loglevel)
        MogamiLog.info("Start initialization...")
        MogamiLog.debug("rootpath = " + self.rootpath)

        # At first, connect to metadata server and send request to attend.
        self.m_channel = channel.MogamiChanneltoMeta()
        self.m_channel.connect(self.metaaddr)
        MogamiLog.debug("Success in creating connection to metadata server")
        self.m_channel.dataadd_req(self.rootpath)

        MogamiLog.info("Init complete!!")
开发者ID:nukamu,项目名称:gxp4,代码行数:28,代码来源:data.py

示例3: datadel

# 需要导入模块: from system import MogamiLog [as 别名]
# 或者: from system.MogamiLog import info [as 别名]
    def datadel(self, ):
        ip = self.c_channel.getpeername()
        ret = self.sysinfo.remove_data_server(ip)

        if ret == True:
            MogamiLog.info("delete data server IP: %s" % ip)
            MogamiLog.info("Now there are %d data servers." %
                           len(self.sysinfo.data_list))
开发者ID:nukamu,项目名称:gxp4,代码行数:10,代码来源:meta.py

示例4: __init__

# 需要导入模块: from system import MogamiLog [as 别名]
# 或者: from system.MogamiLog import info [as 别名]
    def __init__(self, rootpath):
        """This is the function of MogamiMeta's init.
        """
        MogamiLog.init(MogamiLog.TYPE_META, conf.meta_loglevel)

        self.sysinfo = MogamiSystemInfo(rootpath)

        # create a object to retrieve metadata information (meta repository)
        if conf.meta_type == 'fs':
            self.meta_rep = metadata.MogamiMetaFS(rootpath)
        elif conf.meta_type == 'db':
            self.meta_rep = None
        else:
            sys.exit("meta_type should be 'fs' or 'db' in config file")

        MogamiLog.info("** Mogami metadata server init was completed **")
        MogamiLog.debug("rootpath = " + rootpath)
开发者ID:nukamu,项目名称:gxp4,代码行数:19,代码来源:meta.py

示例5: __init__

# 需要导入模块: from system import MogamiLog [as 别名]
# 或者: from system.MogamiLog import info [as 别名]
 def __init__(self, meta_server, *args, **kw):
     Fuse.__init__(self, *args, **kw)
     MogamiLog.info("** Mogami FS init **")
     self.meta_server = meta_server
     self.parse(errex=1)
     m_channel.connect(self.meta_server)
开发者ID:nukamu,项目名称:gxp4,代码行数:8,代码来源:fs.py

示例6: finalize

# 需要导入模块: from system import MogamiLog [as 别名]
# 或者: from system.MogamiLog import info [as 别名]
 def finalize(self, ):
     """Finalizer of Mogami.
     This seems not to be called implicitly...
     """
     m_channel.finalize()
     MogamiLog.info("** Mogami Unmount **")
开发者ID:nukamu,项目名称:gxp4,代码行数:8,代码来源:fs.py


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