log_dump.erl, both available here.
ets:all()to retrieve a list of all the tables available at the node we're connecting to, example output should yield something like this:
ets:i()can be used to obtain more details about tables. Additional informations compared to
id, type, size, mem, owner.
ets:tab2list(Tab)- comfortably presents the table contents on screen (our particular output is explained a bit later)
ets:tab2file(Tab, Filename)- dumps table
Filenamein binary format.
ets:file2tab(Filename, Options)- function reads a file produced by
ets:tab2fileand creates the corresponding table.
127.0.0.1, registered under name
antidote, and your target dump directory is
./dump_dir/(which will be created if it doesn't exist)
/in the dump directory's name is necessary.
./dump_dirwon't work, as it references a file according to unix conventions.
log_operation :: log_operation()part, that is,
tx_id, op_type, log_payload
123-456.LOGcontains data relative to keys, where the first hashes to
123and the last to
456, they're stored in
sync_log, definable in
true: local transactions will be stored on log synchronously, i.e. when the reply is sent the updates are guaranteed to be stored to disk (this is very slow in the current logging setup)
false: all updates are sent to the operating system to be stored to disk (eventually), but are not guaranteed to be stored durably on disk when the reply is sent
disk_log:accessible_logs()call) and delivered following many-to-one scenario (all the logs are stored in a single dump file), in the directory specified as 2nd call argument.
erlang:is_record/2,3. The former allows to parse a file and store its contents into Erlang records - assuming they're properly formatted - the latter verifies the record integrity