cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jingguo Yao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2390) MarshalException is thrown when cassandra-cli creates the example Keyspace specified by conf/schema-sample.txt
Date Sat, 26 Mar 2011 16:42:05 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011658#comment-13011658
] 

Jingguo Yao commented on CASSANDRA-2390:
----------------------------------------

[CASSANDRA-2262|https://issues.apache.org/jira/browse/CASSANDRA-2262] makes BytesType's fromString
method only accept hex strings.

> MarshalException is thrown when cassandra-cli creates the example Keyspace specified
by conf/schema-sample.txt
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2390
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2390
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.7.5
>            Reporter: Jingguo Yao
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Use the following steps to recreate the bug:
> 1. Checkout the source code from trunk. For my case, revision is 1085753.
> 2. Run "ant" to build cassandra.
> 3. Run "bin/cassandra -f" to start cassandra.
> 4. Run "bin/cassandra-cli -host localhost --file conf/schema-sample.txt".
> Then there is the following message:
> {quote}
> ... schemas agree across the cluster
> Line 9 => org.apache.cassandra.db.marshal.MarshalException: cannot parse 'birthdate'
as hex bytes
> {quote}
> The root cause is BytesType's fromString method. FBUtilities's hexToBytes method is invoked
with "birthdate". NumberFormatException is thrown since "birthdate" is not a hex string.
> {code:title=BytesType.java|borderStyle=solid}
>     public ByteBuffer fromString(String source)
>     {
>         try
>         {
>             return ByteBuffer.wrap(FBUtilities.hexToBytes(source));
>         }
>         catch (NumberFormatException e)
>         {
>             throw new MarshalException(String.format("cannot parse '%s' as hex bytes",
source), e);
>         }
>     }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message