设计目标 www.91084.com

GVKun编程网logo

BFS-Baidu 设计目标
8

本文的目的是介绍BFS-Baidu设计目标的详细情况,我们将通过专业的研究、有关数据的分析等多种方式,同时也不会遗漏关于"http://www.baidu.com/art"怎么把baidu替换为123

本文的目的是介绍BFS-Baidu 设计目标的详细情况,我们将通过专业的研究、有关数据的分析等多种方式,同时也不会遗漏关于"http://www.baidu.com/art" 怎么把 baidu 替换为 12345、Android 自动化教程实战:Appium+Python (对应的链接地址:https://www.jianshu.com/p/8b06f76be7e6)、angular-infinite-list 地址:https://github.com/a-jie/angular-infinite-list例子:设计目标BFS-Baidu 设计目标

  • "http://www.baidu.com/art" 怎么把 baidu 替换为 12345
  • Android 自动化教程实战:Appium+Python (对应的链接地址:https://www.jianshu.com/p/8b06f76be7e6)
  • https://github.com/a-jie/angular-infinite-list例子:angular-infinite-list 地址:https://github.com/a-jie/angular-infinite-list例子:BFS-Baidu v0.3.3 发布,百度文件系统
  • 设计目标设计目标

    设计目标BFS-Baidu 设计目标

    BFS-Baidu <a href="https://github.com/baidu/bfs#%E8%AE%BE%E8%AE%A1%E7%9B%AE%E6%A0%87"></a>设计目标<a href="https://github.com/baidu/bfs#%E7%B3%BB%E7%BB%9F%E6%9E%B6%E6%9E%84"></a& 介绍

    The Baidu File System

    百度的核心数据库Tera将数据持久化在分布式文件系统上,分布式文件系统的性能、可用性和扩展性对整个上层搜索业务的稳定性与效果有着至关重要的影响。现有的分布式文件系统(如HDFS等)无法满足低延迟、高可用、跨地域扩展等方面的需求,所以我们从百度搜索的业务特点出发,开发了自己的分布式文件系统BFS。

    设计目标

    1. 高可靠、高可用
      通过将数据副本进行多机房、多地域冗余,实现单个机房、地域遇到严重灾害的情况下,不丢失数据,不影响整体可用性。
      将元数据服务分布化,通过多副本实现高可用,通过Raft等一致性协议同操作日志,实现多副本的一致性。

    2. 高吞吐、低延迟
      通过高性能的存储引擎,最大化存储介质IO吞吐;通过全局的副本、流量调度,实现热点负载均衡。

    3. 水平扩展
      支持跨地域、多数据中心部署,可水平扩展至10万台机器。

    系统架构

    系统主要由NameServer、MetaServer、ChunkServer、SDK、bfs_mount和bfs_client等几个模块构成。
    其中NameServer是中心控制模块,采用集群化部署,负责目录树的管理;ChunkServer是数据节点负责提供文件块的读写服务;SDK以静态库的形式提供了用户使用的API;bfs_mount通过libfuse,将bfs挂载到本地,作为本地文件系统访问;bfs_client是一个二进制的管理工具。

    BFS-Baidu <a href="https://github.com/baidu/bfs#%E8%AE%BE%E8%AE%A1%E7%9B%AE%E6%A0%87"></a>设计目标<a href="https://github.com/baidu/bfs#%E7%B3%BB%E7%BB%9F%E6%9E%B6%E6%9E%84"></a& 官网

    设计目标https://github.com/baidu/bfs

    "http://www.baidu.com/art" 怎么把 baidu 替换为 12345

    Android 自动化教程实战:Appium+Python (对应的链接地址:https://www.jianshu.com/p/8b06f76be7e6)

    Android 自动化教程实战:Appium+Python (对应的链接地址:https://www.jianshu.com/p/8b06f76be7e6)

    本文不在叙述 Appium 环境安装。如有需要请参考:http://www.jianshu.com/p/7a6fa7ab662b

    1. 创建项目目录

    mkdir project{conf,common,logs,doc,tests}
    
    #conf:存放appium-android配置设置,以及App页面元素配置文件;
    #logs:存放日志以及截图;
    #doc:存放文档;
    #common:存放工具类的脚本;
    #tests:存放测试脚本; 

    整个目录如下:

     
    Paste_Image.png

    2. Appium Android 配置文件

    Appium Android Settings 设置如下:


     
    Paste_Image.png

    Python 脚本配置如下:

    #!/usr/bin/env python
    # -*- coding:utf-8 -*-
    
    import os
    import sys
    import time import re from appium import webdriver sys.path.append("..") #用于解决多个手机连接问题 from common.mobile import get_serialno #Read mobile deviceId device_id = get_serialno() #Read mobile os Version os_version = os.popen(''adb -s {0} shell getprop ro.build.version.release''.format(device_id)).read() def appium_start(): config = { ''platformName'':''Android'', #平台 ''platformVersion'':os_version, #系统版本 ''deviceName'':device_id, #测试设备ID # ''appPackage'':''com.jiuai'', # ''appActivity'':''.activity.MainActivity'', ''app'':''/Users/xiaohutu/GitHub/Android-Test/com.jiuai.apk'', #apk路径 #''app'':''D:\com.jiuai.apk'', ''newCommandTimeout'':30, ''automationName'': ''Appium'', ''unicodeKeyboard'':True, #编码,可解决中文输入问题 ''resetKeyboard'':True} return webdriver.Remote(''http://localhost:4723/wd/hub'', config) 

    上述脚本保存为:appium_config.py

    备注:

    from common.mobile import get_serialno
    用于解决多个手机连接问题。具体脚本见:https://github.com/yi-heng/Android-Test/blob/master/Template/common/mobile.py
    

    3. Android 元素定位

    uiautomatorviewer 是 Android SDK 自带的工具,在 $ANDROID_HOME/tools 目录下,可使用此工具查看页面元素。
    使用的测试 app 为本公司的开发的:旧爱,如下:

     
    Paste_Image.png
    driver.find_element_by_id(resource-id).click()
    

    建议:将所有的页面元素集中到一个文件,提高 Appium 脚本的复用性、可配置性,如命名为 config.ini 或 el.ini
    见另外教程:http://www.jianshu.com/p/980a82cde7df

    4. 测试脚本编写

    4.1 导入相关库
    import unittest                                   #Python单元测试框架
    from configparser import ConfigParser             #读取配置库 from selenium import webdriver #导入selenium库 from appium import webdriver #导入appium库 
    4.2 导入 appium 启动脚本
    from conf.appium_config import appium_start
    
    4.3 使用 Unittest 编写测试脚本主体
    class ProductInformation(unittest.TestCase):
        """ TestCase: xxxxx Description: xxxxx """ #@classmethod,在此类中只进行一次初始化和清理工作  @classmethod def setUpClass(self): self.driver = appium_config.appium_start() def test_initial(self): pass  @classmethod def tearDownClass(self): self.driver.quit() 
    4.4 编写测试用例
    def test_initial(self):
       driver.find_element_by_id(resource-id).click()
       driver.find_element_by_id(resource-id).send_keys(u''测试数据'') 
    4.5 组织运行测试用例
    # texture Testcase
    def suite(): tests = [ "test_initial", ] return unittest.TestSuite(map(ProductInformation,tests)) if __name__ == "__main__": unittest.TextTestRunner(verbosity=2).run(suite()) 




    https://github.com/a-jie/angular-infinite-list例子:https://github.com/a-jie/angular-infinite-list例子:

    https://github.com/a-jie/angular-infinite-list例子:angular-infinite-list 地址:https://github.com/a-jie/angular-infinite-list例子:

    Using npm:

    npm install angular-infinite-list --save
    

    Import angular Infinite list module into your app module

    import { InfiniteListModule } from ''angular-infinite-list'';
    
    @NgModule({
      imports: [
        browserModule,
        FormsModule,
        InfiniteListModule,
        ...
    

    Wrap Infinite list tag around list items

    <infinitelist
        [width]=''"100%"'' 
        [height]=''500'' 
        [data]=''data'' 
        [itemSize]=''50'' 
        (update)=''event = $event''>
            <div *ngFor="let item of event?.items; let i=index;" [ngStyle]="event.getStyle(i)">
                item{{event.start + i}} : {{item|json}}
            </div>
    </infinitelist>
    
    or directive usage
    <div infinitelist [width]=''"100%"'' ...</div>
    

    angular-infinite-list 地址:<a href="https://github.com/a-jie/angular-infinite-list">https://github.com/a-jie/angular-infinite-list</a>例子:<a href="https://a-jie.github.io/angular-infinite-l 官网

    https://github.com/a-jie/angular-infinite-list例子:https://github.com/a-jie/angular-infinite-list

    BFS-Baidu v0.3.3 发布,百度文件系统

    BFS-Baidu v0.3.3 发布,百度文件系统

    BFS-Baidu v0.3.3 发布了,BFS 是百度团队从百度搜索的业务特点出发,以高可靠、高可用、高吞吐、低延迟、水平扩展为目标,开发的分布式文件系统。主要由NameServer、MetaServer、ChunkServer、SDK、bfs_mount和bfs_client等几个模块构成。

    更新内容:

    • Merge pull request #534 from baidu/master

    • Merge master

    下载地址:

    • Source code (zip)

    • Source code (tar.gz)

    我们今天的关于BFS-Baidu 设计目标的分享就到这里,谢谢您的阅读,如果想了解更多关于"http://www.baidu.com/art" 怎么把 baidu 替换为 12345、Android 自动化教程实战:Appium+Python (对应的链接地址:https://www.jianshu.com/p/8b06f76be7e6)、angular-infinite-list 地址:https://github.com/a-jie/angular-infinite-list例子:

    本文标签:

    上一篇Land 相关连接正式发布 分布式应用开发框架

    下一篇grabbitmq 基于giiwa 框架的 RabbitMQ 模块(rabbitmq架构)