Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options

Cmd_plasma



plasma - command-line access to PlasmaFS files

Synopsis

plasma list   <general options> [-1] pfs_file ...
plasma create <general options> [-rep n] pfs_file ...
plasma mkdir  <general options> pfs_file ...
plasma delete <general options> pfs_file ...
plasma put    <general options> [-rep n] [-chain] local_file pfs_file
plasma get    <general options> pfs_file local_file

General options:

-cluster <name> -namenode <host>:<port>

Description

The utility plasma allows one to directly access files stored in PlasmaFS via the PlasmaFS-specific RPC protocol.

All pfs_file arguments refer to the file hierarchy of the PlasmaFS cluster. For now, all such files need to be absolute, and there is no symlink resolution.

General options

  • -cluster name: Specifies the name of the PlasmaFS cluster. This can also be given by setting the environment variable PLASMAFS_CLUSTER.
  • -namenode <host>:<port>: Specifies the namenode to contact. This option can be given several times - the system searches then for the right namenode.
The cluster to use is determined as follows:

  1. If -cluster and -namenode options are given, this cluster is used
  2. If there is a configuration file ~/.plasmafs the name set via -cluster is used to select which cluster is accessed
  3. If there is a configuration file ~/.plasmafs, but no -cluster option is passed to the command, the first configuration in the file is taken

The ~/.plasmafs configuration file

See Plasma_client_config.parse_config_file for a description.

list subcommand

list lists files (like Unix ls).

There is only one special option:

  • -1: Outputs one file per line, and nothing else. Without this option, list outputs like ls -l.

create subcommand

create creates a new file (which must not exist already).

Option:

  • -rep n: Creates the file with n replicas. n=0 means the server default, which is also the default if there is no -rep option.

mkdir subcommand

mkdir creates a new directory (which must not exist already).

delete subcommand

delete removes an existing file, or an existing and empty directory.

put subcommand

put creates a new file in PlasmaFS, and copies the contents of local_file to it. local_file must be seekable for now.

Options:

  • -rep n: Creates the file with n replicas. n=0 means the server default, which is also the default if there is no -rep option.
  • -chain: By default, the file is copied using star topology (i.e. a block is independently copied to all datanodes holding replicas). The -chain switch changes this to the chain topology where a block is first copied to one datanode, and from there to the other datanodes storing the replicas.

get subcommand

get downloads a file from PlasmaFS to the local filesystem.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml