GithubHelp home page GithubHelp logo

lawrencehan / bfs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from terry-mao/bfs

0.0 2.0 0.0 21.15 MB

distributed file system(small file storage) writen by golang.

Go 95.31% Makefile 0.34% Awk 0.05% Python 4.16% Shell 0.13%

bfs's Introduction

bfs

bfs 是基于facebook haystack 用golang实现的小文件存储系统。



特性

  • 高吞吐量和低延迟
  • 容错性
  • 高效
  • 维护简单

安装

一、安装hbase、zookeeper

  • 参考hbase官网. 安装、启动请查看这里.
  • 参考zookeeper官网. 安装、启动请查看这里.

二、搭建golang、python环境

三、安装gosnowflake

四、部署

1.下载bfs及依赖包

$ go get -u github.com/Terry-Mao/bfs
$ cd /data/apps/go/src/github.com/Terry-Mao/bfs
$ go get ./...

2.安装directory、store、pitchfork、proxy模块(配置文件请依据实际机器环境配置)

$ cd $GOPATH/src/github.com/Terry-Mao/bfs/directory
$ go install
$ cp directory.toml $GOPATH/bin/directory.toml
$ cd ../store/
$ go install
$ cp store.toml $GOPATH/bin/store.toml
$ cd ../pitchfork/
$ go install
$ cp pitchfork.toml $GOPATH/bin/pitchfork.toml
$ cd ../proxy
$ go install
$ cp proxy.toml $GOPATH/bin/proxy.toml

到此所有的环境都搭建完成!

五、启动

$ cd /$GOPATH/bin
$ nohup $GOPATH/bin/directory -c $GOPATH/bin/directory.toml &
$ nohup $GOPATH/bin/store -c $GOPATH/bin/store.toml &
$ nohup $GOPATH/bin/pitchfork -c $GOPATH/bin/pitchfork.toml &
$ nohup $GOPATH/bin/proxy -c $GOPATH/bin/proxy.toml &
$ cd $GOPATH/github.com/Terry-Mao/bfs/ops
$ nohup python runserver.py &

六、测试

  • bfs初始化,分配存储空间,请查看这里
  • 请求bfs,请查看这里

集群

Aaron Swartz

directory

  • directory主要负责请求的均匀调度和元数据管理,元数据存放在hbase,由gosnowflake产生文件key

store

  • store主要负责文件的物理存储

pitchfork

  • pitchfork负责监控store的服务状态、可用性和磁盘状态

proxy

  • proxy作为bfs存储的代理以及维护bucket相关

ops

  • ops作为bfs的后台管理界面,负责分配存储、扩容、压缩等维护工作

API

api文档

更多

bfs's People

Contributors

didapinchegit avatar frankxieke avatar fzh890523 avatar oikomi avatar terry-mao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.