How to load thrift client in Erlang -
i wish use scribe export data erlang application, have problem running thrift client. install thrift, in erlang lib directory. i'm using: thrift-0.6.1
i found example code connect erlang via thrift scribe:
{ok, c} = thrift_client:start_link("localhost", 1463, scribe_thrift, [{strict_read, false}, {strict_write, false}, {framed, true}]),
but erlang returning error:
** exception error: undefined function thrift_client:start_link/4
when try run application:start(thrift)
, moment see code completion thrift*
7> thrift_client: call/3 close/1 module_info/0 module_info/1 new/2 send_call/3
and there no method start_link
.
i think these days want thrift_client_util:new(host, port, protomodule, options)
which in case be:
thrift_client_util:new("localhost", 1463, scribe_thrift, [{strict_read, false}, {strict_write, false}, {framed, true}]).
and important point bear in mind thrift api in erlang calls return new client state value must use subsequent calls. using client state value twice leads wailing , gnashing of teeth.
Comments
Post a Comment