Hi guys. To test mapred_inputs() in the program, These parameters ([*{**bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket> , key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>} | {bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket> , key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>, term()}] | bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket> | {index, bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket>, Index::binary(), key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>} | {index,bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket>, Index::binary(), StartKey::key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>, EndKey::key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key> **} *) is ok. The "Inputs" parameter({modfun, Module::atom(), Function::atom(), [term()]} ) {modfun, riak_search, mapred_search, [ <<"Bucket">>, <<"SearchQuery">>]} is ok. But myself function is can not work(Inputs = {modfun, trend_riak, test, [<<"a">>, <<"b">>]}). The "trend_riak" module is added riak path. There are errors in the following: {error,<<"Error sending inputs: [{<<\"my\">>,<<\"bu\">>}]">>}
The trend_riak module code. 1 -module(trend_riak). 2 3 -export([test/3]). 4 [{<<"my">>, <<"bu">>}]. Where is wrong? Best wish ,thank you. Jason mapred_inputs() mapred_inputs() = [{bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket> , key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>} | {bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket> , key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>, term()}] | {modfun, Module::atom(), Function::atom(), [term()]} | bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket> | {index, bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket>, Index::binary(), key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>} | {index,bucket()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-bucket>, Index::binary(), StartKey::key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key>, EndKey::key()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-key> } mapred/3 mapred(Pid::pid(), Inputs::mapred_inputs()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-mapred_inputs>, Query::[mapred_queryterm()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-mapred_queryterm>]) -> {ok, mapred_result()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-mapred_result>} | {error, {badqterm, mapred_queryterm()<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#type-mapred_queryterm>}} | {error, timeout} | {error, term()} Equivalent to mapred(Inputs, Query, default_timeout(mapred))<http://basho.github.com/riak-erlang-client/riakc_pb_socket.html#mapred-3> . -- 只为成功找方法,不为失败找理由
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com