Two node cluster

36 views
Skip to first unread message

B H

unread,
Nov 16, 2016, 2:35:44 AM11/16/16
to project-voldemort
Hi,

I tried to run a two node cluster. When I run the client via terminal, it connected successfully. But when I tried to put a key value pair e.g. put "hello" "world", it prompts a ClassCastException: String cannot be cast to [B

Anyone encounter this error? Is there a way to fix this?

Felix GV

unread,
Nov 16, 2016, 2:15:55 PM11/16/16
to project-...@googlegroups.com
This is a character encoding issue...

Byte arrays are not straightforward to type in the shell.

It may be easier to configure your Store Definition to use strings for its schema.

--
Felix GV
Senior Software Engineer
Data Infrastructure
LinkedIn
 
f...@linkedin.com
linkedin.com/in/felixgv


--
You received this message because you are subscribed to the Google Groups "project-voldemort" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-voldemort+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/project-voldemort.
For more options, visit https://groups.google.com/d/optout.

B H

unread,
Nov 17, 2016, 12:20:44 AM11/17/16
to project-voldemort
How can I configure the Store Definition? Which file it resides in ?


On Thursday, 17 November 2016 03:15:55 UTC+8, Felix GV wrote:
This is a character encoding issue...

Byte arrays are not straightforward to type in the shell.

It may be easier to configure your Store Definition to use strings for its schema.

--
Felix GV
Senior Software Engineer
Data Infrastructure
LinkedIn
 
f...@linkedin.com
linkedin.com/in/felixgv


On Tue, Nov 15, 2016 at 11:35 PM, B H <belso...@gmail.com> wrote:
Hi,

I tried to run a two node cluster. When I run the client via terminal, it connected successfully. But when I tried to put a key value pair e.g. put "hello" "world", it prompts a ClassCastException: String cannot be cast to [B

Anyone encounter this error? Is there a way to fix this?

--
You received this message because you are subscribed to the Google Groups "project-voldemort" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-voldem...@googlegroups.com.

Félix GV

unread,
Nov 17, 2016, 1:23:40 AM11/17/16
to project-voldemort
In the config directory, there should be a STORES directory, containing one xml file per store.

B H

unread,
Nov 17, 2016, 2:58:27 AM11/17/16
to project-voldemort
The structure of my config directory is as such

node_0 > config > STORES > test

Are you talking about the test file? The test file looks like this.

<store>
<name>test</name>
<persistence>bdb</persistence>
<description>Test store</description>
<owners>******@hogwarts.edu, ******@hogwarts.edu</owners>
<routing-strategy>consistent-routing</routing-strategy>
<routing>server</routing>
<replication-factor>2</replication-factor>
<preferred-reads>2</preferred-reads>
<required-reads>1</required-reads>
<required-writes>1</required-writes>

<key-serializer> <type>identity</type> </key-serializer>
<value-serializer> <type>java-serialization</type> </value-serializer>

<hinted-handoff-strategy>consistent-handoff</hinted-handoff-strategy>
</store>

Félix GV

unread,
Nov 17, 2016, 11:40:09 AM11/17/16
to project-voldemort
Yes, that's what I'm talking about. For the purpose of testing with the shell, you could try setting the store's key and value serializer type to string.
Reply all
Reply to author
Forward
0 new messages