Skip to content

Instantly share code, notes, and snippets.

@bcg
Created June 27, 2011 13:28
Show Gist options
  • Save bcg/1048851 to your computer and use it in GitHub Desktop.
Save bcg/1048851 to your computer and use it in GitHub Desktop.
# Compile the module
~/src/riak_function_contrib/other/erlang# /usr/lib/riak/erts-5.7.5/bin/erlc bucket_importer.erl
# Move the module
~/src/riak_function_contrib/other/erlang# mv bucket_importer.beam /tmp/
~/src/riak_function_contrib/other/erlang# riak attach
# riak attach
Attempting to restart script through sudo -u riak
Attaching to /tmp/riak/erlang.pipe.1 (^D to exit)
(riak@***)6>
=INFO REPORT==== 27-Jun-2011::10:18:29 ===
[{alarm_handler,{clear,system_memory_high_watermark}}]
([email protected])6> code:add_pathz("/tmp"), l(bucket_importer).
{module,bucket_importer}
([email protected])7> bucket_importer:import_data('riak@***', "us-east", "/usr/tmp/json", "application/json").
/usr/lib/riak/lib/os_mon-2.2.5/priv/bin/memsup: Erlang has closed.
Erlang has closed
eheap_alloc: Cannot allocate 747325720 bytes of memory (of type "heap").
[End]
#
# ps uax|grep riak
riak 12286 0.0 0.0 10840 280 ? S Jun26 0:00 /usr/lib/riak/erts-5.7.5/bin/epmd -daemon
root 15362 0.0 0.1 9132 1060 pts/0 S+ 10:42 0:00 grep --color=auto riak
#
// Reconfigured using http://wiki.basho.com/Setting-Up-Innostore.html
# riak console
Spidermonkey VM (thread stack: 16MB, max heap: 8MB, pool: riak_kv_js_hook) host starting (<0.173.0>)
InnoDB: Mutexes and rw_locks use GCC atomic builtins
110627 11:39:37 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
110627 11:39:37 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
110627 11:39:37 Embedded InnoDB 1.0.6.6750 started; log sequence number 44223
Eshell V5.7.5 (abort with ^G)
^G
# /etc/init.d/riak start
# riak attach
Attempting to restart script through sudo -u riak
Attaching to /tmp/riak/erlang.pipe.1 (^D to exit)
(riak@***)1> code:add_pathz("/tmp"), l(bucket_importer).
{module,bucket_importer}
(riak@***)2> bucket_importer:import_data('riak@***', "us-east", "/usr/tmp/json", "application/json").
/usr/lib/riak/lib/os_mon-2.2.5/priv/bin/memsup: Erlang has closed
Erlang has closed.
eheap_alloc: Cannot allocate 934157120 bytes of memory (of type "heap").
[End]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment