#
# $Id$
#
# Author: Thilee Subramaniam
#
# Copyright 2012,2016 Quantcast Corporation. All rights reserved.
#
# This file is part of Kosmos File System (KFS).
#
# Licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#



This directory contains the following contents:

1. cc/qfssample_main.cc
   cc/CMakeLists.txt
  The C++ client to access QFS. The binary gets compiled as part of QFS build
  (please refer to QFS Wiki Developer-Documentation), and the sample gets
  copied to the <build>/bin/examples directory where <build> is the selected
  build directory.

2. java/QfsSample.java
  The Java client to access QFS.
  To compile:
   $ cd examples/java/
   $ javac -classpath ../../build/qfs-*.jar QfsSample.java
  To run, assuming that make install was performed in ../../build/release,
  or top level make was invoked with no or default target:
   $ libdir="`cd ../../build/release/lib && pwd`"
   $ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${libdir}"
   $ qfsjar=`echo ../../build/qfs-*.jar`
   $ java -Djava.library.path="$libdir" -classpath ".:$qfsjar" QfsSample 127.0.0.1 20000
  (Note: on OS X, use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH)

3. python/qfssample.py
   python/qfssample.cfg
  Python support is at experimental stage now. Nevertheless, one can run this
  example to access QFS via python. The QFS Wiki Developer-Documentation
  explains how to build and install the python QFS extension module.
  To run the qfssample.py, please install qfs python module, and modify
  qfssample.cfg to point to a QFS metaserver.

4. sampleservers
  Directory with a python script to bring up a simple QFS server locally.

  Once you build the C++ binaries (refer to QFS Wiki Developer-Documentation)
  point the sampleservers/sample_setup.py script to a config file and the
  build paths to start the servers.

  A sample config file (sampleservers/sample_setup.cfg file) is provided that
  starts up a metaserver, two chunk servers, and a webserver to monitor the
  servers. Please refer to the comments/Usage of sampleservers/sample_setup.py.

