You need to start the crypto application:

2> application:start(crypto).
ok
3> riak_core_util:unique_id_62().
"V2N2Hcwxa1jkG2y9nFSiJCs9Qyt"


Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
[email protected]


On Tue, Mar 15, 2011 at 10:34 PM, Saurabh Sehgal <[email protected]>wrote:

> Hi,
>
> I tried using the riak_core_util:unique_id_62/0 , but get the following
> error ->
>
> ** exception error: bad argument
>      in function  port_control/3
>         called as port_control(crypto_drv03,5,
>
> <<131,104,2,114,0,3,100,0,13,110,111,110,111,100,101,64,
>                                  110,111,104,111,115,116,0,0,0,0,...>>)
>      in call from crypto:control/2
>      in call from riak_core_util:unique_id_62/0
>
> Any ideas ?
>
>
> On Sat, Mar 12, 2011 at 8:40 AM, Sean Cribbs <[email protected]> wrote:
>
>> That is correct. Either the driver itself or the application code needs to
>> generate a key.
>>
>> Sean Cribbs <[email protected]>
>> Developer Advocate
>> Basho Technologies, Inc.
>> http://basho.com/
>>
>> On Mar 12, 2011, at 1:14 AM, Joshua Partogi wrote:
>>
>> > Hi Dan,
>> >
>> > I guess that also affects other driver that by default uses protobuf
>> > [like the riak python driver] ? Does that mean the riak python driver
>> > need to generate the unique key on the client side when it uses
>> > protobuf?
>> >
>> > Cheers.
>> >
>> > On Sat, Mar 12, 2011 at 4:11 AM, Dan Reverri <[email protected]> wrote:
>> >> Hi Saurabh,
>> >> The protocols buffers interface does not currently support server side
>> >> generated keys. Bug 485 has been filed for this issue:
>> >> https://issues.basho.com/show_bug.cgi?id=485
>> >> In the mean time you can generate a unique key on the client side. You
>> can
>> >> use the code on the server side as a reference for generating unique
>> keys:
>> >>
>> https://github.com/basho/riak_core/blob/master/src/riak_core_util.erl#L131
>> >> Thanks,
>> >> Dan
>> >> Daniel Reverri
>> >> Developer Advocate
>> >> Basho Technologies, Inc.
>> >> [email protected]
>> >>
>> >>
>> >> On Thu, Mar 10, 2011 at 10:37 PM, Saurabh Sehgal <
>> [email protected]>
>> >> wrote:
>> >>>
>> >>> Hi,
>> >>> I was going through riak's documentation and I saw that through the
>> rest
>> >>> API, if a key for an object is not specified, riak generates one for
>> you.
>> >>> Can I do the same when storing objects through the riak erlang pb
>> >>> client programmatically ?
>> >>> Thank you,
>> >>> Saurabh
>> >>>
>> >>> --
>> >>> Saurabh Sehgal
>> >>> E-mail:     [email protected]
>> >>> Phone:     425-269-1324
>> >>> LinkedIn: http://www.linkedin.com/pub/1/7a3/436
>> >>>
>> >>> _______________________________________________
>> >>> riak-users mailing list
>> >>> [email protected]
>> >>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> >>>
>> >>
>> >>
>> >> _______________________________________________
>> >> riak-users mailing list
>> >> [email protected]
>> >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > http://twitter.com/jpartogi
>> >
>> > _______________________________________________
>> > riak-users mailing list
>> > [email protected]
>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>> _______________________________________________
>> riak-users mailing list
>> [email protected]
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>
>
>
> --
> Saurabh Sehgal
> E-mail:     [email protected]
> Phone:     425-269-1324
> LinkedIn: http://www.linkedin.com/pub/1/7a3/436
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to