Code Monkey home page Code Monkey logo

cse291e-lab2's Introduction

MAKEFILE TARGETS

To compile all Java files, execute
        make
To run all test cases, run
        make tests
To package class files into a single, monolithic distribution of the filesystem,
run
        make jar
This produces a file called dfs.jar, which can be used to start naming and
storage servers, and to run utilities. To package source files into an archive,
run
        make archive

To generate documentation, execute
        make docs
The documentation can then be viewed at javadoc/index.html. The suggested
reading order for the packages is rmi, then common, naming, storage, client,
apps. Alternatively, complete documentation of all classes and members can be
generated using
        make docs-all
and then viewed at javadoc-all/index.html.

To clean the build directories, execute
        make clean


TESTS

Various tests can be run by executing:
        java conformance.ConformanceTests
        java -cp ./:./unit unit.UnitTests
        java test.SelfTest
Conformance tests check the public interfaces of the classes in the various
packages for conformance to the written specifications. The tests are thorough
but not exhaustive. Conformance tests are grouped by the packages they test. For
example, conformance tests for the RMI library, which is in the package rmi, are
grouped in the package conformance.rmi. Conformance tests are used for grading.
You have been provided with a large number of conformance tests to help you find
problems with your code. However, there may be additional tests used by the
staff during grading. Testing thoroughly is your responsibility.

Unit tests can be written to check package-private classes. Unit tests are in
the same package as the class they are testing: a unit test for a class in the
package rmi would also be in the package rmi (whereas a conformance test would
be in the different package conformance.rmi). Unit tests, are, however, kept in
a different directory in the source tree. The Java classpath is altered when
running unit tests to put the unit tests logically in the same package as the
code they are testing.

The class test.SelfTest runs some basic self-tests on the testing library.

APPLICATIONS

The naming and storage servers can be started as follows:
        java -jar dfs.jar naming
        java -jar dfs.jar storage (local-address) (naming-server) (local-path)
The naming server is fairly self-explanatory. The arguments for starting the
storage server are:
    local-address: the externally-visible hostname or IP address of the machine
                   on which the server is running. This is necessary because the
                   externally-visible name of the local machine cannot always be
                   easily determined due to routers, firewalls, etc.
    naming-server: the hostname or IP address of the naming server with which
                   the storage server is to register.
    local-path:    the local directory in which the storage server is to locate
                   the files it is to serve. Be careful with this directory -
                   the storage server may choose to delete some of the files in
                   it.

cse291e-lab2's People

Contributors

huangtao800 avatar billjyc avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

billjyc

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.