Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update to the comments
  • Loading branch information
kuenishi committed Apr 30, 2015
commit 885f839c4247eb87e478a5e0a3b2cb967d2f559a
7 changes: 4 additions & 3 deletions priv/tools/internal/offline_delete.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ main([BitcaskDir, BlocksListFile]) ->
offline_delete(BitcaskDir, BlocksListFile, false, false);
main(_) ->
io:format(standard_error,
"options: [--dry-run][--old-format] <BitcaskDir> <BlocksListFile>~n"
"\033[31m\033[1m[Caution] Make sure Riak is not running!!!\033[0m~n", []).
"options: [--dry-run] [--old-format] <BitcaskDir> <BlocksListFile>~n"
"\033[31m\033[1m[Caution] Make sure Riak is not running!!!\033[0m~n"
"It'd be better if all hinted handoff have been finished before stopping Riak.~n", []).

-spec open_all_bitcask(filename:filename()) ->
orddict:orddict(non_neg_integer(), reference()).
Expand Down Expand Up @@ -75,7 +76,7 @@ make_sure(Dir) ->
io:format(standard_error,
"\033[31m[Warning]\033\[0m~n"
"Make sure any Riak process using '~s' is not running "
"or your data may corrupt.~n", [Dir]),
"or your data may corrupt.~n", [filename:absname(Dir)]),
"y\n" = io:get_line("Accept the terms of conditions? [y/N] ").

offline_delete(BitcaskDir, BlocksListFile, DryRun, OldFormat) ->
Expand Down
5 changes: 3 additions & 2 deletions priv/tools/internal/select_gc_bucket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ handle_manifest({_UUID, ?MANIFEST{bkey=BKey={Bucket,_},
BlockSequences = riak_cs_lfs_utils:block_sequences_for_manifest(M),
Count = ordsets:fold(fun({UUID1, SeqNo}, Count0) ->
BK = {B,K} = full_bkey(Bucket, dummy, UUID1, SeqNo),
VNodes = [[integer_to_list(VNode), $\t] || VNode <- vnode_ids(BK, RingSize, 3)],
VNodes = [[integer_to_list(VNode), $\t]
|| VNode <- vnode_ids(BK, RingSize, 3)],
%% Partitions, UUID, SeqNo
file:write(File, [VNodes, $\t,
file:write(File, [VNodes,
mochihex:to_hex(B), $\t,
mochihex:to_hex(K), $\t,
mochihex:to_hex(UUID1), $\t,
Expand Down