Error creating bucket with LevelDB bucket-type

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Error creating bucket with LevelDB bucket-type

Felipe Esteves
Hi,

I'm running some tests with riak-kv official container (riak version 2.1.4), to create a leveldb backend bucket-type.

I'm following riak and python riak client documentation, as follow:

Riak conf has:

storage_backend = multi
multi_backend.bitcask_mult.storage_backend = bitcask
multi_backend.bitcask_mult.bitcask.data_root = /var/lib/riak/bitcask_mult
multi_backend.leveldb_mult.storage_backend = leveldb
multi_backend.leveldb_mult.leveldb.data_root = /var/lib/riak/leveldb_mult
multi_backend.default = bitcask_mult

After riak start, I run:
riak-admin bucket-type create leveldb_backend '{"props":{"backend":"leveldb"}}'
riak-admin bucket-type activate leveldb_backend

riak-admin bucket-type status leveldb_backend
leveldb_backend is active
.....
backend: <<"leveldb">>
.....
active: true
...

In Python, I run:
myClient = riak.RiakClient(http_port=8098, protocol='http', host='127.0.1.1')
myBucket = myClient.bucket('foo', bucket_type='leveldb_backend')
key1 = myBucket.new('barr', data='foobar')
key1.store()

However, I'm getting this error in riak:
2016-12-15 13:13:48.598 [error] <0.1408.0> gen_fsm <0.1408.0> in state active terminated with reason: no case clause matching {riak_kv_
multi_backend,undefined_backend,<<"leveldb">>} in riak_core_vnode:vnode_command/3 line 346
2016-12-15 13:13:48.598 [error] <0.1408.0> CRASH REPORT Process <0.1408.0> with 2 neighbours exited with reason: no case clause matchin
g {riak_kv_multi_backend,undefined_backend,<<"leveldb">>} in riak_core_vnode:vnode_command/3 line 346 in gen_fsm:terminate/7 line 622
2016-12-15 13:13:48.598 [error] <0.165.0> Supervisor riak_core_vnode_sup had child undefined started with {riak_core_vnode,start_link,undefined} at <0.1408.0> exit with reason no case clause matching {riak_kv_multi_backend,undefined_backend,<<"leveldb">>} in riak_core_vnode:vnode_command/3 line 346 in context child_terminated

Am I missing some point in this configuration? Seems to me that I've followed all the official docs but with no success.


Felipe Esteves

Tecnologia

[hidden email]





_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Error creating bucket with LevelDB bucket-type

Felipe Esteves
Hi,

I've managed to correct this error of mine, using the correct backend name, that is, leveldb_mult instead of leveldb

Now I have another problem: the python client returns no error, the riak log is also clean.
But I can find the created bucket when I run buckets?buckets=true
Seems to me it isn't being persisted, I'm investigating.

Felipe Esteves

Tecnologia

[hidden email]



2016-12-15 11:45 GMT-02:00 Felipe Esteves <[hidden email]>:
Hi,

I'm running some tests with riak-kv official container (riak version 2.1.4), to create a leveldb backend bucket-type.

I'm following riak and python riak client documentation, as follow:

Riak conf has:

storage_backend = multi
multi_backend.bitcask_mult.storage_backend = bitcask
multi_backend.bitcask_mult.bitcask.data_root = /var/lib/riak/bitcask_mult
multi_backend.leveldb_mult.storage_backend = leveldb
multi_backend.leveldb_mult.leveldb.data_root = /var/lib/riak/leveldb_mult
multi_backend.default = bitcask_mult

After riak start, I run:
riak-admin bucket-type create leveldb_backend '{"props":{"backend":"leveldb"}}'
riak-admin bucket-type activate leveldb_backend

riak-admin bucket-type status leveldb_backend
leveldb_backend is active
.....
backend: <<"leveldb">>
.....
active: true
...

In Python, I run:
myClient = riak.RiakClient(http_port=8098, protocol='http', host='127.0.1.1')
myBucket = myClient.bucket('foo', bucket_type='leveldb_backend')
key1 = myBucket.new('barr', data='foobar')
key1.store()

However, I'm getting this error in riak:
2016-12-15 13:13:48.598 [error] <0.1408.0> gen_fsm <0.1408.0> in state active terminated with reason: no case clause matching {riak_kv_
multi_backend,undefined_backend,<<"leveldb">>} in riak_core_vnode:vnode_command/3 line 346
2016-12-15 13:13:48.598 [error] <0.1408.0> CRASH REPORT Process <0.1408.0> with 2 neighbours exited with reason: no case clause matchin
g {riak_kv_multi_backend,undefined_backend,<<"leveldb">>} in riak_core_vnode:vnode_command/3 line 346 in gen_fsm:terminate/7 line 622
2016-12-15 13:13:48.598 [error] <0.165.0> Supervisor riak_core_vnode_sup had child undefined started with {riak_core_vnode,start_link,undefined} at <0.1408.0> exit with reason no case clause matching {riak_kv_multi_backend,undefined_backend,<<"leveldb">>} in riak_core_vnode:vnode_command/3 line 346 in context child_terminated

Am I missing some point in this configuration? Seems to me that I've followed all the official docs but with no success.


Felipe Esteves

Tecnologia

[hidden email]






_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Error creating bucket with LevelDB bucket-type

Luke Bakken
> But I can find the created bucket when I run buckets?buckets=true
> Seems to me it isn't being persisted, I'm investigating.

What is the command you are running? Please provide the complete command.

--
Luke Bakken
Engineer
[hidden email]

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Error creating bucket with LevelDB bucket-type

Felipe Esteves
Hi, Luke,

The bucket_type with leveldb is called ldb. Buckets "teste and "books" already existed.

Python3:
>>> myClient = riak.RiakClient(http_port=8098, protocol='http', host='127.0.1.1')
>>> myBucket = myClient.bucket('foo', bucket_type='ldb')
>>> keyb = myBucket.new('bar', data='foobar')
>>> keyb.store()
<riak.riak_object.RiakObject object at 0x7fb2a168de10>
>>> myClient.get_buckets()
[<RiakBucket 'teste'>, <RiakBucket 'books'>]

HTTP:
curl 127.0.1.1:8098/buckets?buckets=true

{"buckets":["teste","books"]}

If I run the same procedure without specifying bucket_type, it works well.
Couldn't figure out yet what's the problem.

Felipe Esteves

Tecnologia

[hidden email]



Em 15 de dezembro de 2016 13:56, Luke Bakken <[hidden email]> escreveu:
> But I can find the created bucket when I run buckets?buckets=true
> Seems to me it isn't being persisted, I'm investigating.

What is the command you are running? Please provide the complete command.

--
Luke Bakken
Engineer
[hidden email]

________________________________
Esta mensagem pode conter informações confidenciais e somente o indivíduo ou entidade a quem foi destinada pode utilizá-la. A transmissão incorreta da mensagem não acarreta a perda de sua confidencialidade. Caso esta mensagem tenha sido recebida por engano, solicitamos que o fato seja comunicado ao remetente e que a mensagem seja eliminada de seu sistema imediatamente. É vedado a qualquer pessoa que não seja o destinatário usar, revelar, distribuir ou copiar qualquer parte desta mensagem. Ambiente de comunicação sujeito a monitoramento.

This message may include confidential information and only the intended addresses have the right to use it as is, or any part of it. A wrong transmission does not break its confidentiality. If you've received it because of a mistake or erroneous transmission, please notify the sender and delete it from your system immediately. This communication environment is controlled and monitored.

B2W Digital





_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Error creating bucket with LevelDB bucket-type

Luke Bakken
What is the output of this command:

curl 127.0.1.1:8098/types/ldb/buckets?buckets=true

I see that our docs do *not* give an example of listing buckets in a
bucket type:

http://docs.basho.com/riak/kv/2.2.0/developing/api/http/list-buckets/

I have opened an issue here to improve the documentation:
https://github.com/basho/basho_docs/issues/2337

On Thu, Dec 15, 2016 at 8:13 AM, Felipe Esteves
<[hidden email]> wrote:

> Hi, Luke,
>
> The bucket_type with leveldb is called ldb. Buckets "teste and "books"
> already existed.
>
> Python3:
>>>> myClient = riak.RiakClient(http_port=8098, protocol='http',
>>>> host='127.0.1.1')
>>>> myBucket = myClient.bucket('foo', bucket_type='ldb')
>>>> keyb = myBucket.new('bar', data='foobar')
>>>> keyb.store()
> <riak.riak_object.RiakObject object at 0x7fb2a168de10>
>>>> myClient.get_buckets()
> [<RiakBucket 'teste'>, <RiakBucket 'books'>]
>
> HTTP:
> curl 127.0.1.1:8098/buckets?buckets=true
>
> {"buckets":["teste","books"]}
>
> If I run the same procedure without specifying bucket_type, it works well.
> Couldn't figure out yet what's the problem.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Error creating bucket with LevelDB bucket-type

Felipe Esteves
Hi, Luke,

It worked! Thanks a lot for the help and the feedback!

Felipe Esteves

Tecnologia

[hidden email]

Tel.: (21) 3504-7162 ramal 57162

Skype: felipe2esteves


2016-12-15 14:19 GMT-02:00 Luke Bakken <[hidden email]>:
What is the output of this command:

curl 127.0.1.1:8098/types/ldb/buckets?buckets=true

I see that our docs do *not* give an example of listing buckets in a
bucket type:

http://docs.basho.com/riak/kv/2.2.0/developing/api/http/list-buckets/

I have opened an issue here to improve the documentation:
https://github.com/basho/basho_docs/issues/2337

On Thu, Dec 15, 2016 at 8:13 AM, Felipe Esteves
<[hidden email]> wrote:
> Hi, Luke,
>
> The bucket_type with leveldb is called ldb. Buckets "teste and "books"
> already existed.
>
> Python3:
>>>> myClient = riak.RiakClient(http_port=8098, protocol='http',
>>>> host='127.0.1.1')
>>>> myBucket = myClient.bucket('foo', bucket_type='ldb')
>>>> keyb = myBucket.new('bar', data='foobar')
>>>> keyb.store()
> <riak.riak_object.RiakObject object at 0x7fb2a168de10>
>>>> myClient.get_buckets()
> [<RiakBucket 'teste'>, <RiakBucket 'books'>]
>
> HTTP:
> curl 127.0.1.1:8098/buckets?buckets=true
>
> {"buckets":["teste","books"]}
>
> If I run the same procedure without specifying bucket_type, it works well.
> Couldn't figure out yet what's the problem.

________________________________
Esta mensagem pode conter informações confidenciais e somente o indivíduo ou entidade a quem foi destinada pode utilizá-la. A transmissão incorreta da mensagem não acarreta a perda de sua confidencialidade. Caso esta mensagem tenha sido recebida por engano, solicitamos que o fato seja comunicado ao remetente e que a mensagem seja eliminada de seu sistema imediatamente. É vedado a qualquer pessoa que não seja o destinatário usar, revelar, distribuir ou copiar qualquer parte desta mensagem. Ambiente de comunicação sujeito a monitoramento.

This message may include confidential information and only the intended addresses have the right to use it as is, or any part of it. A wrong transmission does not break its confidentiality. If you've received it because of a mistake or erroneous transmission, please notify the sender and delete it from your system immediately. This communication environment is controlled and monitored.

B2W Digital





_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com