Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

cluster_info removal #226

Closed
wants to merge 2 commits into from

1 participant

@evanmcc

Cluster info has been folded into riaknostic, so rip it out here.

@evanmcc evanmcc referenced this pull request in basho/riak
Closed

cluster_info removal #212

@evanmcc

doesn't look like this is going to happen, closing.,

@evanmcc evanmcc closed this
@seancribbs seancribbs deleted the pevm_cluster_info_remove branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 10, 2012
  1. @evanmcc

    cluster_info removal

    evanmcc authored
Commits on Sep 26, 2012
  1. @evanmcc

    missed a spot

    evanmcc authored
This page is out of date. Refresh to see the latest.
View
1  ebin/riak_core.app
@@ -19,7 +19,6 @@
riak_core_apl,
riak_core_app,
riak_core_bucket,
- riak_core_cinfo_core,
riak_core_claimant,
riak_core_claim,
riak_core_claim_sim,
View
4 src/riak_core_app.erl
@@ -58,10 +58,6 @@ start(_StartType, _StartArgs) ->
throw({error, invalid_ring_state_dir})
end,
- %% Register our cluster_info app callback modules, with catch if
- %% the app is missing or packaging is broken.
- catch cluster_info:register_app(riak_core_cinfo_core),
-
%% add these defaults now to supplement the set that may have been
%% configured in app.config
riak_core_bucket:append_bucket_defaults(
View
78 src/riak_core_cinfo_core.erl
@@ -1,78 +0,0 @@
-%% -------------------------------------------------------------------
-%%
-%% Riak: A lightweight, decentralized key-value store.
-%%
-%% Copyright (c) 2007-2010 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,
-%% software distributed under the License is distributed on an
-%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-%% KIND, either express or implied. See the License for the
-%% specific language governing permissions and limitations
-%% under the License.
-%%
-%% -------------------------------------------------------------------
--module(riak_core_cinfo_core).
-
--export([cluster_info_init/0, cluster_info_generator_funs/0]).
-
-%% @spec () -> term()
-%% @doc Required callback function for cluster_info: initialization.
-%%
-%% This function doesn't have to do anything.
-
-cluster_info_init() ->
- ok.
-
-%% @spec () -> list({string(), fun()})
-%% @doc Required callback function for cluster_info: return list of
-%% {NameForReport, FunOfArity_1} tuples to generate ASCII/UTF-8
-%% formatted reports.
-
-cluster_info_generator_funs() ->
- [
- {"Riak Core config files", fun config_files/1},
- {"Riak Core vnode modules", fun vnode_modules/1},
- {"Riak Core ring", fun get_my_ring/1},
- {"Riak Core latest ring file", fun latest_ringfile/1},
- {"Riak Core active partitions", fun active_partitions/1}
- ].
-
-vnode_modules(CPid) -> % CPid is the data collector's pid.
- cluster_info:format(CPid, "~p\n", [riak_core:vnode_modules()]).
-
-get_my_ring(CPid) ->
- {ok, Ring} = riak_core_ring_manager:get_my_ring(),
- cluster_info:format(CPid, "~p\n", [Ring]).
-
-latest_ringfile(CPid) ->
- {ok, Path} = riak_core_ring_manager:find_latest_ringfile(),
- {ok, Contents} = file:read_file(Path),
- cluster_info:format(CPid, "Latest ringfile: ~s\n", [Path]),
- cluster_info:format(CPid, "File contents:\n~p\n", [binary_to_term(Contents)]).
-
-active_partitions(CPid) ->
- Pids = [Pid || {_,Pid,_,_} <- supervisor:which_children(riak_core_vnode_sup)],
- Vnodes = [riak_core_vnode:get_mod_index(Pid) || Pid <- Pids],
- Partitions = lists:foldl(fun({_,P}, Ps) ->
- ordsets:add_element(P, Ps)
- end, ordsets:new(), Vnodes),
- cluster_info:format(CPid, "~p\n", [Partitions]).
-
-config_files(C) ->
- {ok, [[AppPath]]} = init:get_argument(config),
- EtcDir = filename:dirname(AppPath),
- VmPath = filename:join(EtcDir, "vm.args"),
- [begin
- cluster_info:format(C, "File: ~s\n", [os:cmd("ls -l " ++ File)]),
- {ok, FileBin} = file:read_file(File),
- cluster_info:format(C, "File contents:\n~s\n", [FileBin])
- end || File <- [AppPath, VmPath]].
-
Something went wrong with that request. Please try again.