创造Keyspace

时间:2012-02-13 13:00:14

标签: erlang cassandra thrift

我正在尝试从erlang访问cassandra,作为测试我正在尝试创建一个新的密钥空间。我这样做:

1> RR(cassandra_thrift)。

[authenticationException,authenticationRequest,
 authorizationException,cfDef,column,columnDef,
 columnOrSuperColumn,columnParent,columnPath,counterColumn,
 counterSuperColumn,cqlMetadata,cqlResult,cqlRow,deletion,
 endpointDetails,indexClause,indexExpression,
 invalidRequestException,keyCount,keyRange,keySlice,ksDef,
 mutation,notFoundException,schemaDisagreementException,
 slicePredicate,sliceRange,superColumn|...]

2 - ; 【OK,C1} = thrift_client_util:新的( “127.0.0.1”,9160,thrift_cassandra,[])

{ok,{tclient,thrift_cassandra,
        {protocol,thrift_binary_protocol,
            {binary_protocol,
                {transport,thrift_buffered_transport,
                    {buffered_transport,
                        {transport,thrift_socket_transport,
                            {data,#Port<0.593>,infinity}},
                        []}},
                true,true}},
        0}}

第3&GT; REPLY1 = thrift_client:呼叫(C1,set_keyspace,[ “Test_KS”])

** exception exit: undef
     in function  thrift_cassandra:function_info/2
        called as thrift_cassandra:function_info(set_keyspace,params_type)
     in call from thrift_client:send_function_call/3 (thrift_client.erl, line 70)
     in call from thrift_client:call/3 (thrift_client.erl, line 40)

我做错了什么,或者我的erlang无法访问cassandra函数?我该如何解决?

1 个答案:

答案 0 :(得分:2)

我会使用https://github.com/ostinelli/erlcassa而不是来自Erlang的原始Thrift。

相关问题