Skip to content

Commit

Permalink
Merge branch 'master' of github.com:quantcast/qfs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeov committed Sep 1, 2012
2 parents 4a463e4 + 0459d4c commit dacd989
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 20 deletions.
32 changes: 19 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
#
# Do not assume gnumake -- keep it as simple as possible

release:
all: release

prep:
mkdir -p build

release: prep
cd build && \
{ test -d release || mkdir release; } && \
cd release && \
Expand All @@ -30,16 +35,7 @@ release:
if test -x "`which ant 2>/dev/null`"; then ant jar; fi
if test -x "`which python 2>/dev/null`"; then \
cd build/release && python ../../src/cc/access/kfs_setup.py build; fi
# cd build/release && make test
cd build/release && ../../src/test-scripts/kfstest.sh

tarball: release
cd build && \
tar -cvf kfs.tar -C ./release ./bin ./lib ./include && \
tar -rvf kfs.tar -C ../ ./scripts ./webui ./examples ./benchmarks && \
gzip qfs.tar

debug:
debug: prep
cd build && \
{ test -d debug || mkdir debug; } && \
cd debug && \
Expand All @@ -48,8 +44,18 @@ debug:
if test -x "`which ant 2>/dev/null`"; then ant jar; fi
if test -x "`which python 2>/dev/null`"; then \
cd build/debug && python ../../src/cc/access/kfs_setup.py build; fi
# cd build/debug && make test

tarball: release
cd build && \
tar -cvf qfs.tar -C ./release ./bin ./lib ./include && \
tar -rvf qfs.tar -C ../ ./scripts ./webui ./examples ./benchmarks && \
gzip qfs.tar

test-debug:
cd build/debug && ../../src/test-scripts/kfstest.sh

test-release:
cd build/release && ../../src/test-scripts/kfstest.sh

clean:
rm -rf build/release build/debug build/classes build/kfs-*.jar build/*.tar.gz
rm -rf build
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@ Welcome to QFS!

Quantcast File System (QFS) is a high-performance, fault-tolerant, distributed file system developed to support applications with sequential access pattern over large files.

Quick Links:

Compiling And Running
---------------------

The QFS Wiki has details on compiling QFS and running it. For a quick start, one could run the following commands from the top-level directory:

* Build Code:
`make`
* Try Out:
`make` and `examples/sampleservers/sample_setup.py --help`
* Benchmark:
`make` and `benchmarks/mstress/mstress_sample_run.sh --help`

Quick Links
-----------

* [Getting Started](http://github.com/quantcast/qfs/wiki)
* [Repository Organization](https://github.com/quantcast/qfs/wiki/Repository-Organization)
* [Required Packages]()
* [Compiling QFS]()
* [Installation]()

* [Developer Documentation](https://github.com/quantcast/qfs/wiki/Developer-Documentation)

Contributing to QFS
===================
Expand All @@ -22,5 +33,5 @@ QFS is an open source, community-driven project, and we would like you to contri
License
=======

QFS is released under the Apache 2.0 license. A copy of the license is included in the file LICENSE.txt.
QFS is released under the Apache 2.0 license. A copy of the license is included in the file [LICENSE.txt](https://github.com/quantcast/qfs/blob/master/LICENSE.txt).

1 change: 0 additions & 1 deletion build/.gitignore

This file was deleted.

25 changes: 25 additions & 0 deletions examples/sampleservers/sample_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,29 @@ def parse_command_line():
stop - stop meta and chunk servers
uninstall - remove meta and chunk server directories after stopping them"""

sampleSession = """
Hello World example of a client session:
# Install sample server setup, only needed once.
./examples/sampleservers/sample_setup.py -a install
# Start QFS servers locally (1 metaserver, 2 chunkservers).
./examples/sampleservers/sample_setup.py -a start
PATH=${PATH}:${PWD}/build/release/bin/tools
# Make temp directory.
kfsshell -s localhost -p 20000 -q -- mkdir /qfs/tmp
# Create file containing Hello World, Reed-Solomon encoded, replication 1.
echo 'Hello World' \
| cptokfs -s localhost -p 20000 -S -r 1 -k /qfs/tmp/helloworld -d -
# Cat file content.
kfscat -s localhost -p 20000 /qfs/tmp/helloworld
# Stat file to see encoding (RS or not), replication level, mtime.
kfsshell -s localhost -p 20000 -q -- stat /qfs/tmp/helloworld
# Copy file locally to current directory.
cpfromkfs -s localhost -p 20000 -k /qfs/tmp/helloworld -d ./helloworld
# Remove file from QFS.
kfsshell -s localhost -p 20000 -q -- rm /qfs/tmp/helloworld
./examples/sampleservers/sample_setup.py -a stop
"""

# an install sets up all config files and (re)starts the servers.
# an uninstall stops the servers and removes the config files.
# a stop stops the servers.
Expand All @@ -238,6 +261,7 @@ def parse_command_line():
if opts.help:
parser.print_help()
print actions
print sampleSession
print
posix._exit(0)

Expand All @@ -259,6 +283,7 @@ def parse_command_line():
if len(e) > 0:
parser.print_help()
print actions
print sampleSession
print
for error in e:
print "*** %s" % error
Expand Down

0 comments on commit dacd989

Please sign in to comment.