X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7791c7e1b09341ce1fed131c6b11c91da8217c3f..30b02581c938c05b804f7510a1fc8e850830b9cd:/doc/user/topics/keep.html.textile.liquid diff --git a/doc/user/topics/keep.html.textile.liquid b/doc/user/topics/keep.html.textile.liquid index f7c5926609..86f1132d9b 100644 --- a/doc/user/topics/keep.html.textile.liquid +++ b/doc/user/topics/keep.html.textile.liquid @@ -1,29 +1,37 @@ --- layout: default navsection: userguide -navmenu: Topics title: "How Keep works" ... -h1. Getting Data from Keep - In Keep, information is stored in *data blocks*. Data blocks are normally between 1 byte and 64 megabytes in size. If a file exceeds the maximum size of a single data block, the file will be split across multiple data blocks until the entire file can be stored. These data blocks may be stored and replicated across multiple disks, servers, or clusters. Each data block has its own identifier for the contents of that specific data block. In order to reassemble the file, Keep stores a *collection* data block which lists in sequence the data blocks that make up the original file. A collection data block may store the information for multiple files, including a directory structure. -In this example we will use @c1bad4b39ca5a924e481008009d94e32+210@ which we added to keep in the previous section. First let us examine the contents of this collection using @arv keep get@: +In this example we will use @c1bad4b39ca5a924e481008009d94e32+210@ which we added to Keep in "the first Keep tutorial":{{ site.baseurl }}/user/tutorials/tutorial-keep.html. First let us examine the contents of this collection using @arv keep get@: -
/scratch/you$ arv keep get c1bad4b39ca5a924e481008009d94e32+210
+
~$ arv keep get c1bad4b39ca5a924e481008009d94e32+210
 . 204e43b8a1185621ca55a94839582e6f+67108864 b9677abbac956bd3e86b1deb28dfac03+67108864 fc15aff2a762b13f521baf042140acec+67108864 323d2a3ce20370c4ca1d3462a344f8fd+25885655 0:227212247:var-GS000016015-ASM.tsv.bz2
 
-The command @arv keep get@ fetches the contents of the locator @c1bad4b39ca5a924e481008009d94e32+210@. This is a locator for a collection data block, so it fetches the contents of the collection. In this example, this collection consists of a single file @var-GS000016015-ASM.tsv.bz2@ which is 227212247 bytes long, and is stored using four sequential data blocks, 204e43b8a1185621ca55a94839582e6f+67108864, b9677abbac956bd3e86b1deb28dfac03+67108864, fc15aff2a762b13f521baf042140acec+67108864, 323d2a3ce20370c4ca1d3462a344f8fd+25885655. +The command @arv keep get@ fetches the contents of the collection @c1bad4b39ca5a924e481008009d94e32+210@. In this example, this collection includes a single file @var-GS000016015-ASM.tsv.bz2@ which is 227212247 bytes long, and is stored using four sequential data blocks, @204e43b8a1185621ca55a94839582e6f+67108864@, @b9677abbac956bd3e86b1deb28dfac03+67108864@, @fc15aff2a762b13f521baf042140acec+67108864@, and @323d2a3ce20370c4ca1d3462a344f8fd+25885655@. + +Let's use @arv keep get@ to download the first data block: + +notextile.
~$ cd /scratch/you
+/scratch/you$ arv keep get 204e43b8a1185621ca55a94839582e6f+67108864 > block1
+ +{% include 'notebox_begin' %} + +When you run this command, you may get this API warning: + +notextile.
WARNING:root:API lookup failed for collection 204e43b8a1185621ca55a94839582e6f+67108864 (<class 'apiclient.errors.HttpError'>: <HttpError 404 when requesting https://qr1hi.arvadosapi.com/arvados/v1/collections/204e43b8a1185621ca55a94839582e6f%2B67108864?alt=json returned "Not Found">)
-Let's use @arv keep get@ to download the first datablock: +This happens because @arv keep get@ tries to find a collection with this identifier. When that fails, it emits this warning, then looks for a datablock instead, which succeeds. -notextile.
/scratch/you$ arv keep get 204e43b8a1185621ca55a94839582e6f+67108864 > block1
+{% include 'notebox_end' %} Let's look at the size and compute the md5 hash of @block1@: @@ -35,6 +43,6 @@ Let's look at the size and compute the md5 hash of @block1@:
-Notice that the block identifer 204e43b8a1185621ca55a94839582e6f+67108864 of: -* the md5 hash @204e43b8a1185621ca55a94839582e6f@ which matches the md5 hash of @block1@ -* a size hint @67108864@ which matches the size of @block1@ +Notice that the block identifer 204e43b8a1185621ca55a94839582e6f+67108864 consists of: +* the md5 hash of @block1@, @204e43b8a1185621ca55a94839582e6f@, plus +* the size of @block1@, @67108864@.