-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
87 lines (80 loc) · 4.02 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#=====================================================================
# README - CS505 Spring 2016 - Final Project
# Zhihao Yao, [email protected]
# Cheng Huang, [email protected]
#=====================================================================
(a) Usage:
- Library requirement:
- Cmake >=3.3
- Boost library >=1.55
- C++ compiler supports C++11 (4.9 tested)
- Apache Thrift 0.9.3
- Please refer to INSTALL_UBUNTU14 for more environment setup.
- Compile:
- Install required library listed above.
- Compile Thrift-generated includes / program codes:
$ cd protocol
$ ./compileThrift.sh
- Generate CMake lists
$ cd .. # Goto program source folder.
$ cmake .
$ make all
- Execution in Xinu lab
- There is a version of executables in bin/ folder.
The file "hosts.txt" contains all server names that we will run on.
(Note "hosts.txt" current contains "Xinu01", "Xinu02", "Xinu03".)
- On hosts "Xinu01", "Xinu02", and "Xinu03", begin server program:
$ ./raftfs -f hosts.txt -p 6000
- Use another console window to run client test program: (e.g. "Xinu09")
$ ./fsclient ./fsclient -f hosts.txt -p 6000
- After execution, use "Ctrl-C" to terminate server program in each
console.
- Execution with Docker
See docker/Docker.md
(b) File and directory list:
------------------------------------------------------------------
/ : source main entry
- README : This file you are currently reading.
- INSTALL_UBUNTU14 : Setup procedures of a fresh intalled Ubuntu14
- CMakeLists.txt : Cmake build configuration
- hosts.txt : Default 3-server execution list.
------------------------------------------------------------------
server/ : Raft servers
- server_main.cpp : **Program main entry**
- RaftConsensus.* : Functions to perform Raft Consensus
- RaftMetaServer.* : Threads to handle state machine
- ClientRPCService.*: Functions for client's getting info.
- RaftRPCService.* : Def of RPC calls
------------------------------------------------------------------
protocol/ : Thrift's protocol def and generated files
- compileThrift.sh : Generate thrift lib with def files
- Raft.thrift : Server RPCs Raft definition
- Client.thrift : Client RPCs Raft definition
- Filesystem.thrift : Filesystem related def.
- *.cpp; *.h : Thrift generated files.
------------------------------------------------------------------
filesystem/ : Virtual file system / namespace
- FSNamespace.* : Virtual file system top layer
- INode.* : file / dir element.
------------------------------------------------------------------
client/ : Client of the DFS
- client_main.cpp : Client main entry.
Also we call the performance tests here.
- RaftFS.* : Client of DFS functions.
------------------------------------------------------------------
storage/ : Log / Storage related functions
- LogManager.* : Memeory log functions.
------------------------------------------------------------------
filesystem/ : Namespace and Inode for file system
- FSNamespace.* : Namespace class and functions
- INode.* : INode definition for each file and dir.
------------------------------------------------------------------
utils/ : Used utilities.
- Options.* : Commandline parser.
- time_utils.h : Formatted time output.
------------------------------------------------------------------
test/ : Unit tests
------------------------------------------------------------------
log_perf_tests/ : A set of performance test results.
------------------------------------------------------------------
docker/ : Docker execution files.