Skip to content
Permalink
Browse files

Merge pull request #928 from chu11/kvscleanup2

initial flux-kvs cleanup
  • Loading branch information...
garlick committed Dec 22, 2016
2 parents a1fe845 + 0702878 commit 24973c8d25fdc2308acfc9151e9fe2efda2bed6c
Showing with 2,098 additions and 827 deletions.
  1. +25 −72 doc/man1/flux-kvs.adoc
  2. +528 −510 src/cmd/flux-kvs.c
  3. +9 −0 t/Makefile.am
  4. +731 −0 t/kvs/basic.c
  5. +208 −242 t/t1000-kvs-basic.t
  6. +594 −0 t/t1002-kvs-cmd.t
  7. +2 −2 t/t1007-kz.t
  8. +1 −1 t/t1008-proxy.t
@@ -46,63 +46,55 @@ COMMANDS
Retrieve the value stored under 'key'. If nothing has been stored under
'key', display an error message.

*type* 'key' ['key...']::
Display the JSON type of the value under key: 'null', 'boolean', 'double',
'int', 'object', 'array', or 'string'. If nothing has been stored under
'key', display an error message.

*put* 'key=value' ['key=value...']::
Store 'value' under 'key' and commit it. If it already has a value,
overwrite it.

*dir* [-r] [-d] ['key']::
*dir* [-R] [-d] ['key']::
Display all keys and their values under the directory 'key'.
If 'key' does not exist or is not a directory, display an error message.
If 'key' is not provided, "." (root of the namespace) is assumed. If '-r'
If 'key' is not provided, "." (root of the namespace) is assumed. If '-R'
is specified, recursively display keys under subdirectories. If '-d' is
specified, do not output key values.

*dirsize* 'key'::
Get the number of keys in a directory.

*unlink* 'key' ['key...']::
*unlink* [-R] 'key' ['key...']::
Remove 'key' from the KVS and commit the change. If 'key' represents
a directory, remove all keys underneath it. If nothing has been stored
under 'key', do nothing (it is not an error).
a directory, specify '-R' to remove all keys underneath it.

*link* 'target' 'linkname'::
Create a new name for 'target', similar to a symbolic link, and commit
the change. 'target' does not have to exist. If 'linkname' exists,
it is overwritten.

*readlink* 'key'::
*readlink* 'key' ['key...']::
Retrieve the key a link refers to rather than its value, as would be
returned by *get*.

*mkdir* 'key'::
*mkdir* 'key' ['key...']::
Create an empty directory and commit the change. If 'key' exists,
it is overwritten.

*watch* [count] 'key'::
Watch 'key', displaying each change on a line of output. If the key
is not set, display "NULL". If 'count' is specified, display at most
'count' versions. Otherwise, command runs forever.

*watch-dir* [-r] [-d] [count] 'key'::
Watch directory specified at 'key', displaying changes within it and
in subdirectories. If '-r' is specified, recursively display keys
under subdirectories. If '-d' is specified, do not output key values.
If 'count' is specified, display at most 'count' versions. Otherwise,
this command runs forever.
*copy* 'source' 'destination'::
Copy 'source' key to 'destination' key. If a directory is copied, a new
reference is created; it is unnecessary for *copy* to recurse into 'source'.

*copy-tokvs* 'key' 'file'::
Copy data from 'file' to 'key', encoding to Z85 format and committing
the change. 'file' may be a UNIX file name or "-" indicating standard
input.
*move* 'source' 'destination'::
Like *copy*, but 'source' is unlinked after the copy.

*copy-fromkvs* 'key' 'file'::
Copy data from 'key' to 'file', decoding from Z85 format.
'file' may be a UNIX file name or "-" indicating standard output.
*dropcache* [--all]::
Tell the local KVS to drop any cache it is holding. If '--all' is
specified, send an event across the comms session instructing all KVS
instances to drop their caches.

*watch* [-R] [-d] [-o] [-c count] 'key'::
Watch 'key' and output changes. If 'key' is a single value, each
change will be displayed on a line of output. If 'key' is a
directory, changes within the directory and changes within it will be
displayed. If '-R' is specified, recursively display keys under
subdirectories. If '-d' is specified, do not output key values. If
'count' is specified, display at most 'count' changes. Otherwise,
this command runs forever. If '-o' is specified, output the current
value before outputting changes.

*version*::
Display the current KVS version, an integer value. The version starts
@@ -117,45 +109,6 @@ of synchronization between peers is: node A puts a value, commits it,
reads version, sends version to node B. Node B waits for version, gets
value.

*dropcache*::
Tell the local KVS to drop any cache it is holding.

*dropcache-all*::
Send an event across the comms session instructing all KVS instances
to drop their caches.

*copy* 'source' 'destination'::
Copy 'source' key to 'destination' key. If a directory is copied, a new
reference is created; it is unnecessary for *copy* to recurse into 'source'.

*move* 'source' 'destination'::
Like *copy*, but 'source' is unlinked after the copy.

*get-treeobj* 'key'::
Retrieve the directory entry associated with 'key'.
A treeobj should be treated as an opaque string value, which
may contain spaces.

*put-treeobj* 'key="treeobj"'::
Associate a new treeobj with 'key', overwriting the previous treeobj,
if any. A treeobj should be treated as an opaque string value, which
may contain spaces.

*getat* 'treeobj' 'key'::
Retrieve the value stored under 'key', starting the lookup at 'treeobj'.
If nothing has been stored under 'key', display an error message.

*dirat* [-r] [-d] 'treeobj' ['key']::
Display all keys and their values under the directory 'key', starting
lookup at 'treeobj'. If 'key' does not exist or is not a directory,
display an error message. If 'key' is not provided, "." (root of the
namespace) is assumed. If '-r' is specified, recursively display keys
under subdirectories. If '-d' is specified, do not output key values.

*readlinkat* 'treeobj' 'key'::
Retrieve the key a link refers to rather than its value, as would be
returned by *get*, starting lookup at 'treeobj'.


AUTHOR
------
Oops, something went wrong.

0 comments on commit 24973c8

Please sign in to comment.
You can’t perform that action at this time.