This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ok, C} = riak:local_client(). | |
{ok, F} = luwak_file:get(C, <<"filename">>). | |
PrevRoot = hd(luwak_file:get_property(F, ancestors)). | |
V = riak_object:get_value(F). | |
V2 = lists:keyreplace(root, 1, V, {root, PrevRoot}). | |
TempF = riak_object:apply_updates(riak_object:update_value(F, V2)). | |
Bytes = luwak_io:get_range(C, TempF, 0, Length). % where Length is number of bytes you want to read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Pull a random sample of size 1000 from a directory of files and | |
# write to standard out. | |
# | |
# Usage: | |
# ./sample-lines /path/to/dir > mysample.log | |
if [ $# -lt 1 ] | |
then |
NewerOlder