Exemple #1
0
    # Wire down various parameters.
    #
    myId = "directoryTest"
    myPassword = "******"
    #
    # Use minimal replication (but not a single copy).  The test is likely to
    # be stressful enough without additional copies.
    #
    replicationParams = \
        "AObject.Replication.Store=2;" \
        "VObject.Replication.Store=2;" \
        "BObject.Replication.Store=2"
    fileSystemName = "directoryTestFS"
    fileSystemPassword = "******"

    celestefs = Celestefs(myId, myPassword, "127.0.0.1", 14000,
        replicationParams, jvmopts=["-server", "-ea"])
    #
    # Arrange to see what JVM invocations are issued.
    #
    #celestefs.verbose = True

    #
    # Ensure that the credential corresponding to myId and myPassword exists.
    #
    if not celestefs.credentialExists(myId):
        celestefs.mkid()

    #
    # Now do the same thing for the file system in which the directory and its
    # entries are to live.
    #
Exemple #2
0
        methodProp = "sunlabs.celeste.client.filesystem.ProfilerConfiguration"
        outputProp = "sunlabs.celeste.client.filesystem.ProfilerOutputFile"
        profiledMethods = [
            "CelesteFileSystem.CelesteOutputStream.write",
            "CelesteFileSystem.File.write",
            "FileImpl.write",
            "FileImpl.tryWriteVersion"
        ]
        profilingOpt = \
            [ "-DenableProfiling=true" ] + \
            [ "-D%s=%s" % (methodProp, ":".join(profiledMethods)) ] + \
            [ "-D%s=%s" % (outputProp, timingsFile) ]
    else:
        profilingOpt = []

    celestefs = Celestefs(myId, myPassword, "127.0.0.1", 14000,
        jvmopts=["-server", "-ea"] + profilingOpt)
    #
    # Arrange to see what JVM invocations are issued.
    #
    celestefs.verbose = True

    #
    # Start interactions with CelesteFileSystem and Celeste.
    #

    #
    # Ensure that the credential corresponding to myId and myPassword exists.
    #
    if not celestefs.credentialExists(myId):
        celestefs.mkid()
Exemple #3
0
#        "BObject.Replication.Store=2"
    replicationParams = \
        "AObject.Replication.Store=1;" \
        "VObject.Replication.Store=1;" \
        "BObject.Replication.Store=1;" \
        "Credential.Replication.Store=1"
    fileSystemName = "exampleFS"
    fileSystemPassword = "******"

    #
    # Use the 64-bit Jvm so that we can handle large files.  Disable socket
    # timeouts, so that lengthy i/os don't trigger them.  Request chattiness
    # from the CelesteFs implementation layer.
    #
    celestefs = Celestefs(myId, myPassword, "127.0.0.1", 14000,
        replicationParams, timeout=0,
        jvmopts=["-server", "-ea", "-Dverbose=true", "-Xmx600m", "-Xms600m", "-XX:+UseParallelGC"])
    #
    # Arrange to see what JVM invocations are issued.
    #
    celestefs.verbose = True
    

    #
    # Ensure that the credential corresponding to myId and myPassword exists.
    #
    if not celestefs.credentialExists(myId):
        celestefs.mkid()

    #
    # Now do the same thing for the file system in which inFileName's to be
Exemple #4
0
# A test that verifies that writes throught the celestefs interface maintain
# file offsets properly.
#
# XXX:  This test should be tidied up a bit.  It should accept the file name
#       as argument, so that it can be run repeatedly.  It should also accept
#       a block size argument.
#

from celestefs import Celestefs
from sys import exit, stderr

if __name__ == "__main__":

    name = "offsetTest"

    c = Celestefs(name, name)
    c.verbose = True

    if not c.credentialExists(name):
        c.mkid()

    if not c.fileSystemExists(name):
        if not c.mkfs(name, name):
            print "mkfs(%s, %s) failed" % (name, name)
            exit(1)

    filename = "/" + name + "/" + "file"

    #
    # Create or truncate the test file, as approriate.
    #