This has been moved to GitHub as a proper project
Note: It is not
eaccess
An example created when the ring folder is not owned by the user riak is running as:
2015-06-23 14:57:43.073 [error] <0.154.0>@riak_core_ring_manager:do_write_ringfile:236 Unable to write ring to "./data/ring/riak_core_ring.default.20150623185743" - {badmatch,{error,eacces}}
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
| #!/usr/bin/env escript | |
| %% -*- erlang -*- | |
| %%! -smp enable -sname convert_binary_ring -mnesia debug verbose | |
| main([RingFile, OutFile]) -> | |
| try | |
| {ok, Binary} = file:read_file(RingFile), | |
| Ring = binary_to_term(Binary), | |
| try | |
| file:write_file(OutFile, io_lib:format("~p.~n", [Ring])), |
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
| Force_remove_s3_bucket = fun(UserID, Bucket) -> | |
| Update_user_buckets = fun(User, Bucket) -> | |
| Buckets = User#rcs_user_v2.buckets, | |
| %% At this point any siblings from the read of the | |
| %% user record have been resolved so the user bucket | |
| %% list should have 0 or 1 buckets that share a name | |
| %% with `Bucket'. | |
| case [B || B <- Buckets, B#moss_bucket_v1.name =:= Bucket#moss_bucket_v1.name] of | |
| [] -> | |
| {ok, User#rcs_user_v2{buckets=[Bucket | Buckets]}}; |
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
| %% Shell functions that can be run in `riak-cs attach` | |
| %% Peek({S3Bucket, Key}) will fetch an object and display the sibling count and | |
| %% the number of manifests in the object. | |
| Peek = fun({Bucket, Key}) -> | |
| io:format("Peeking at ~p/~p.~n", [Bucket, Key]), | |
| {ok, RcPid} = riak_cs_riak_client:checkout(), | |
| ManifestBucket = riak_cs_utils:to_bucket_name(objects, Bucket), | |
| ok = riak_cs_riak_client:set_bucket_name(RcPid, Bucket), |
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
| Preflist = fun(Bucket,Key) -> | |
| BKey = {Bucket,Key}, | |
| {ok, Ring} = riak_core_ring_manager:get_my_ring(), | |
| DocIdx = riak_core_util:chash_key(BKey), | |
| BucketProps = riak_core_bucket:get_bucket(Bucket, Ring), | |
| [NValue] = [Y || {X1, Y} <- BucketProps, n_val == X1], | |
| UpNodes = riak_core_node_watcher:nodes(riak_kv), | |
| Preflist2 = riak_core_apl:get_apl_ann(DocIdx, NValue, Ring, UpNodes), | |
| [IndexNode || {IndexNode, _Type} <- Preflist2] | |
| end. |
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
| %% These are shell functions that can be used to output a keylist from a bitcask file in terms of Riak {Bucket,Key} tuples | |
| %% They should be run from `riak attach`. Paste in the contents and run ListAll("filename.txt"). Profit. | |
| ListCask = fun(Vnode,OutFile) -> | |
| Bk_to_tuple = | |
| fun(<<1:7, HasType:1, Sz:16/integer, | |
| TypeOrBucket:Sz/bytes, Rest/binary>>) -> | |
| case HasType of | |
| 0 -> | |
| %% no type, first field is bucket | |
| {TypeOrBucket, Rest}; |
Riak is a complex system that includes many moving parts to monitor, such as the health of the hardware, the well-being of the software, and the responsiveness of the network. This document will discuss metrics, thresholds, and values that indicate when your monitoring system should be sending alarms.
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
| %% Copyright (c) 2015 Basho Technologies, Inc. All Rights Reserved. | |
| %% | |
| %% This file is provided to you under the Apache License, | |
| %% Version 2.0 (the "License"); you may not use this file | |
| %% except in compliance with the License. You may obtain | |
| %% a copy of the License at | |
| %% | |
| %% http://www.apache.org/licenses/LICENSE-2.0 | |
| %% | |
| %% Unless required by applicable law or agreed to in writing, |
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
| [ | |
| {lager, | |
| [ | |
| {error_logger_hwm,100}, | |
| {error_logger_redirect,true}, | |
| {crash_log_date,"$D0"}, | |
| {crash_log_size,10485760}, | |
| {crash_log_msg_size,65536}, | |
| {handlers, | |
| [ |