Skip to content

Commit

Permalink
modify outward-facing kfs* files (binaries, libraries, scripts) to qfs*
Browse files Browse the repository at this point in the history
  • Loading branch information
thilee committed Sep 15, 2012
1 parent 739519f commit bc8ca80
Show file tree
Hide file tree
Showing 53 changed files with 160 additions and 160 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cmake_minimum_required(VERSION 2.4.6)
project (KFS)

if (DEFINED KFS_DIR_PREFIX)
message ("Kfs source dir prefix: ${KFS_DIR_PREFIX}")
message ("Qfs source dir prefix: ${KFS_DIR_PREFIX}")
set(CMAKE_MODULE_PATH ${KFS_DIR_PREFIX}cmake)
else (DEFINED KFS_DIR_PREFIX)
set(KFS_DIR_PREFIX "")
Expand Down Expand Up @@ -171,11 +171,11 @@ IF (NOT ${JAVA_INCLUDE_PATH} STREQUAL "" AND NOT DEFINED JNI_FOUND)
ENDIF (NOT ${JAVA_INCLUDE_PATH} STREQUAL "" AND NOT DEFINED JNI_FOUND)

IF (JNI_FOUND)
message(STATUS "JNI found: building kfs_access")
message(STATUS "JNI found: building qfs_access")
include_directories ( ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} )
add_subdirectory (${KFS_DIR_PREFIX}src/cc/access src/cc/access)
ELSE (JNI_FOUND)
message(STATUS "JNI NOT found: NOT building kfs_access")
message(STATUS "JNI NOT found: NOT building qfs_access")
ENDIF (JNI_FOUND)

IF (NOT ${Fuse_LIBRARY_DIR} STREQUAL "")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/mstress/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ BOOST_LIBRARY_DIR?=/opt/local/lib
endif
INCLUDES = -I. -I$(KFS_BUILD_INCLUDE)/kfs
CCFLAGS = -g -O2 $(INCLUDES)
LIBS = -lkfs_tools -lkfs_client -lkfs_qcdio -lpthread -lkfs_io -lkfs_common -lkfs_qcdio -lpthread -lz -lcrypto -lkfs_qcrs -lboost_regex
LIBS = -lqfs_tools -lqfs_client -lqfs_qcdio -lpthread -lqfs_io -lqfs_common -lqfs_qcdio -lpthread -lz -lcrypto -lqfs_qcrs -lboost_regex
ifneq ($(UNAME), Darwin)
LIBS += -lrt
endif
Expand Down
30 changes: 15 additions & 15 deletions benchmarks/mstress/README
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ specified by the benchmark plan.
Do ./mstress_initialize.sh --h to see options.

- Makefile
Used to build the KFS stress client (C++) and HDFS stress client (Java).
Used to build the QFS stress client (C++) and HDFS stress client (Java).
Ensure that $JAVA_HOME is set correctly.

- mstress_client.cc
Produces the mstress_client binary that actually drives the KFS metaserver.
Produces the mstress_client binary that actually drives the QFS metaserver.
Build using the provided Makefile ('make ccclient')
See 'Benchmarking Procedure' below for details.

Expand Down Expand Up @@ -118,7 +118,7 @@ specified by the benchmark plan.
Do mstress_run.py --help to see usage.

- mstress_sample_run.sh
Used to run sample benchmarks on given KFS and HDFS servers by launching
Used to run sample benchmarks on given QFS and HDFS servers by launching
clients on localhost. Essentially a wrapper around mstress_initialize.sh,
make, mstress_prepare_master_clients.sh, and mstress.run.py.

Expand All @@ -138,7 +138,7 @@ The procedure below assumes different machines, but one can also run all
on the same box, "localhost".


(1) Setup the KFS metaserver and HDFS namenode with the help of
(1) Setup the QFS metaserver and HDFS namenode with the help of
section [4] "Setting up DFS metaserver/namenode" below.


Expand All @@ -164,21 +164,21 @@ on the same box, "localhost".
./mstress_initialize.sh /usr/lib/hadoop/client/


(5) On the build host, compile and install KFS using the steps described in
(5) On the build host, compile and install QFS using the steps described in
https://github.com/quantcast/qfs/wiki/Developer-Documentation. Then change
directory to benchmarks/mstress, and just issuing 'make' should build the
Java/C++ clients.

To manually build C++ client:
- Assuming the kfs code is in ~/code/kfs, compile and install KFS using
- Assuming the QFS code is in ~/code/qfs, compile and install QFS using
the steps described in
https://github.com/quantcast/qfs/wiki/Developer-Documentation
- cd ~/code/kfs/benchmarks/mstress
- KFS_BUILD_INCLUDE=~/code/kfs/build/include \
KFS_BUILD_STATLIB=~/code/kfs/build/lib/static \
- cd ~/code/qfs/benchmarks/mstress
- QFS_BUILD_INCLUDE=~/code/qfs/build/include \
QFS_BUILD_STATLIB=~/code/qfs/build/lib/static \
BOOST_LIBRARY_DIR=/opt/local/lib \
make
If you encounter any build problem, ensure that your KFS_BUILD_INCLUDE etc.
If you encounter any build problem, ensure that your QFS_BUILD_INCLUDE etc.
refer to valid paths.


Expand Down Expand Up @@ -219,13 +219,13 @@ on the same box, "localhost".

(9) Checklist: check the presence of,
- the plan file on master host and client hosts (step 8 does this for you)
- the mstress_client binaries (KFS and HDFS clients) on master and all
- the mstress_client binaries (QFS and HDFS clients) on master and all
client hosts (step 7).

(10) Run the benchmark from the master with mstress.py.
Do ./mstress.py --help to see options.
Eg:
./mstress.py -f kfs -s <metahost> -p <metaport> -a </tmp/something.plan>
./mstress.py -f qfs -s <metahost> -p <metaport> -a </tmp/something.plan>
./mstress.py -f hdfs -s <namehost> -p <nameport> -a </tmp/something.plan>

(11) The benchmark name, progress, and time taken will be printed out.
Expand All @@ -234,14 +234,14 @@ on the same box, "localhost".
[4] DFS Server Setup
====================

[4.1] KFS Metaserver Setup
[4.1] QFS Metaserver Setup
-------------------------

You can setup the KFS metaserver using the steps described in
You can setup the QFS metaserver using the steps described in
https://github.com/quantcast/qfs/wiki

If you want to set up a simple metaserver for local testing, please use the
script ~/code/kfs/examples/sampleservers/sample_setup.py.
script ~/code/qfs/examples/sampleservers/sample_setup.py.


[4.2] HDFS Namenode Setup
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/mstress/mstress.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def ParseCommandline():
action='store',
default=None,
type='string',
help='Filesystem whose metaserver to test. kfs or hdfs.')
help='Filesystem whose metaserver to test. qfs or hdfs.')
parser.add_option('-s', '--server',
action='store',
default=None,
Expand Down Expand Up @@ -401,7 +401,7 @@ def SetGlobalPaths(opts):
mydir = os.path.dirname(os.path.realpath(__file__))
Globals.MASTER_PATH = os.path.join(mydir, 'mstress.py')

if opts.filesystem == 'kfs':
if opts.filesystem == 'qfs':
Globals.CLIENT_PATH = os.path.join(mydir, 'mstress_client')
Globals.SERVER_CMD = Globals.KFS_SERVER_CMD
Globals.SERVER_KEYWORD = Globals.KFS_SERVER_KEYWORD
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/mstress/mstress_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* License for the specific language governing permissions and limitations
* under the License.
*
* This C++ client performs filesystem meta opetarions on the KFS metaserver
* using kfsClient.
* This C++ client performs filesystem meta opetarions on the QFS metaserver
* using qfs_client.
*
*/

Expand Down Expand Up @@ -47,7 +47,7 @@ FILE* logFile = stdout;

/*
This program is invoked with the following arguments:
- kfs server/port
- qfs server/port
- test name ('create', 'stat', or 'readdir')
- a planfile
- keys to read the planfile (hostname and process name)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/mstress/mstress_initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# under the License.
#
#
# The mstress runs stress tests on KFS metaserver and HDFS namenode. To be able
# The mstress runs stress tests on QFS metaserver and HDFS namenode. To be able
# to work with the namenode, the java HDFS client needs to be compiled and run
# with hadoop hdfs jars.
#
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/mstress/mstress_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def NumFiles2Stat():
def Usage():
print 'Usage: %s [clients] [fs_type,fs_host,fs_port] [fs_type,fs_host,fs_port]..' % sys.argv[0]
print ' clients: comma separated list of client host names'
print ' fs_type: kfs or hdfs'
print ' fs_type: qfs or hdfs'
print ' fs_host: metaserver or namenode hostname'
print ' fs_port: metaserver or namenode port'
print 'Eg: %s 10.15.20.25,10.20.25.30 kfs,10.10.10.10,10000 hdfs,20.20.20.20,20000'
print 'Eg: %s 10.15.20.25,10.20.25.30 qfs,10.10.10.10,10000 hdfs,20.20.20.20,20000'
sys.exit(0)


Expand Down Expand Up @@ -123,13 +123,13 @@ def ParseArgs():
Params.CLIENT_HOSTS = sys.argv[1].strip()

triple = sys.argv[2].strip().split(',')
if len(triple) != 3 or triple[0] not in ('kfs', 'hdfs'):
if len(triple) != 3 or triple[0] not in ('qfs', 'hdfs'):
Usage()
Params.TARGETS.append(triple)

if argc > 3:
triple = sys.argv[3].strip().split(',')
if len(triple) != 3 or triple[0] not in ('kfs', 'hdfs'):
if len(triple) != 3 or triple[0] not in ('qfs', 'hdfs'):
Usage()
Params.TARGETS.append(triple)

Expand Down
14 changes: 7 additions & 7 deletions benchmarks/mstress/mstress_sample_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@
SERVER_ARGS=""

function usage() {
echo "Usage: $0 [-k host:port] [-h host:port]
-k: KFS metaserver host and port.
echo "Usage: $0 [-q host:port] [-h host:port]
-q: QFS metaserver host and port.
-h: HDFS namenode host and port.
This benchmark, run on CentOS systems, tests the QFS metaserver against
HDFS namenode. Please refer to the README file in this directory if you run
into any setup, build, or run issue while using the mstress benchmark." >&2
}

while getopts 'k:h:' OPTION
while getopts 'q:h:' OPTION
do
case $OPTION in
k)
KFS_HOST=$(echo "$OPTARG" | cut -d ":" -f 1)
KFS_PORT=$(echo "$OPTARG" | cut -d ":" -f 2)
SERVER_ARGS=$SERVER_ARGS" kfs,"$KFS_HOST","$KFS_PORT""
q)
QFS_HOST=$(echo "$OPTARG" | cut -d ":" -f 1)
QFS_PORT=$(echo "$OPTARG" | cut -d ":" -f 2)
SERVER_ARGS=$SERVER_ARGS" qfs,"$QFS_HOST","$QFS_PORT""
;;
h)
HDFS_HOST=$(echo "$OPTARG" | cut -d ":" -f 1)
Expand Down
14 changes: 7 additions & 7 deletions examples/cc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
# Build the C++ example binary
#

add_executable (kfssample kfssample_main.cc)
add_executable (qfssample qfssample_main.cc)

if (USE_STATIC_LIB_LINKAGE)
target_link_libraries (kfssample kfsClient qcdio pthread)
add_dependencies (kfssample kfsClient qcdio)
target_link_libraries (qfssample kfsClient qcdio pthread)
add_dependencies (qfssample kfsClient qcdio)
else (USE_STATIC_LIB_LINKAGE)
target_link_libraries (kfssample kfsClient-shared qcdio-shared pthread)
add_dependencies (kfssample kfsClient-shared qcdio-shared)
target_link_libraries (qfssample kfsClient-shared qcdio-shared pthread)
add_dependencies (qfssample kfsClient-shared qcdio-shared)
endif (USE_STATIC_LIB_LINKAGE)

if (NOT APPLE)
target_link_libraries(kfssample rt)
target_link_libraries(qfssample rt)
endif (NOT APPLE)

install (TARGETS kfssample
install (TARGETS qfssample
RUNTIME DESTINATION bin/examples)
10 changes: 5 additions & 5 deletions examples/cc/kfssample_main.cc → examples/cc/qfssample_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
// implied. See the License for the specific language governing
// permissions and limitations under the License.
//
// \brief A sample C++ program that demonstrates KFS APIs. To run
// \brief A sample C++ program that demonstrates QFS APIs. To run
// this program, you need:
// - kfs client libraries to link with
// - a KFS deployment
// - qfs client libraries to link with
// - a QFS deployment
//
// The cmake build system takes care of compiling this. Follow the DeveloperDoc
// in the top-level 'doc' directory for compile instructions.
//
// To see compile commandline (assuming KFS code is at ~/code/kfs, and it has
// To see compile commandline (assuming QFS code is at ~/code/qfs, and it has
// already been compiled using instructions),
// cd ~/code/kfs/build/examples/cc && make VERBOSE=1
// cd ~/code/qfs/build/examples/cc && make VERBOSE=1
//
//----------------------------------------------------------------------------

Expand Down
14 changes: 7 additions & 7 deletions examples/java/KfsSample.java → examples/java/QfsSample.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
* \brief A Sample Java program to access KFSAccess APIs. To run this program,
* \brief A Sample Java program to access QFSAccess APIs. To run this program,
* you need:
* - qfs.jar in your CLASSPATH
* - libkfs_access.so in your LD_LIBRARY_PATH
* - libqfs_access.so in your LD_LIBRARY_PATH
* - a QFS deployment
* Eg:
* javac -cp ~/code/kfs/build/<qfs>.jar KfsSample.java
* LD_LIBRARY_PATH=~/code/kfs/build/lib \
* java -cp .:~/code/kfs/build/<qfs>.jar KfsSample localhost 20000
* javac -cp ~/code/qfs/build/<qfs>.jar QfsSample.java
* LD_LIBRARY_PATH=~/code/qfs/build/lib \
* java -cp .:~/code/qfs/build/<qfs>.jar QfsSample localhost 20000
*/


Expand All @@ -39,11 +39,11 @@
import java.nio.ByteBuffer;
import com.quantcast.qfs.access.*;

public class KfsSample
public class QfsSample
{
public static void main(String args[]) {
if (args.length < 1) {
System.out.println("Usage: KfsTest <meta server> <port>");
System.out.println("Usage: QfsSample <meta server> <port>");
System.exit(1);
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# NOTE: The python support for KFS is EXPERIMENTAL at this stage. The
# NOTE: The python support for QFS is EXPERIMENTAL at this stage. The
# python extension module has not been tested on large scale
# deploymentsi yet. Please excercise caution while using the
# python wrapper.
Expand Down
20 changes: 10 additions & 10 deletions examples/python/kfssample.py → examples/python/qfssample.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# permissions and limitations under the License.

#
# NOTE: The python support for KFS is EXPERIMENTAL at this stage. The
# NOTE: The python support for QFS is EXPERIMENTAL at this stage. The
# python extension module has not been tested on large scale
# deploymentsi yet. Please excercise caution while using the
# python module.
Expand All @@ -31,35 +31,35 @@
the created paths are valid, and that the file contents are as expected.
To run this script,
- Prepare kfs.so as described in the file 'doc/ClientDeveloperDoc'
- Ensure that the KFS metaserver and chunkserver are running.
- Prepare qfs.so as described in the file 'doc/ClientDeveloperDoc'
- Ensure that the QFS metaserver and chunkserver are running.
- Ensure that the metaserver host/port matches the contents of argv[1].
- Ensure that the PYTHONPATH and LD_LIBRARY_PATH are set accordingly.
eg: PYTHONPATH=${PYTHONPATH}:~/code/kfs/build/lib/lib64/python \
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/code/kfs/build/lib \
python ./kfssample.py kfssample.cfg
eg: PYTHONPATH=${PYTHONPATH}:~/code/qfs/build/lib/lib64/python \
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/code/qfs/build/lib \
python ./qfssample.py qfssample.cfg
"""

import os
import sys
import time
import errno

import kfs
import qfs

def main():
if len(sys.argv) < 2:
sys.exit('Usage: %s config_file' % sys.argv[0])

client = None
try:
client = kfs.client(sys.argv[1])
client = qfs.client(sys.argv[1])
except:
print "Unable to start the KFS client."
print "Unable to start the QFS client."
print "Make sure that the meta- and chunkservers are running."
sys.exit(1)

testBaseDir = "kfssample_base"
testBaseDir = "qfssample_base"
testDirs = ("dir1", "dir2")
testFile1 = "dir1/file1"
testFile2 = "file2"
Expand Down
Loading

0 comments on commit bc8ca80

Please sign in to comment.