You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jingguo Yao (JIRA)" <ji...@apache.org> on 2011/03/26 17:32:05 UTC

[jira] [Created] (CASSANDRA-2390) MarshalException is thrown when cassandra-cli creates the example Keyspace specified by conf/schema-sample.txt

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


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

[jira] [Commented] (CASSANDRA-2390) MarshalException is thrown when cassandra-cli creates the example Keyspace specified by conf/schema-sample.txt

Posted by "Jingguo Yao (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Updated] (CASSANDRA-2390) MarshalException is thrown when cassandra-cli creates the example Keyspace specified by conf/schema-sample.txt

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2390:
--------------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 0.7.5
         Assignee: Jonathan Ellis

> 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
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.5
>
>   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

[jira] [Commented] (CASSANDRA-2390) MarshalException is thrown when cassandra-cli creates the example Keyspace specified by conf/schema-sample.txt

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011737#comment-13011737 ] 

Hudson commented on CASSANDRA-2390:
-----------------------------------

Integrated in Cassandra-0.7 #409 (See [https://hudson.apache.org/hudson/job/Cassandra-0.7/409/])
    specify UTF8Type comparator to fix regression found by Jingguo Yao
patch by jbellis for CASSANDRA-2390


> 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
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.5
>
>   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

[jira] [Resolved] (CASSANDRA-2390) MarshalException is thrown when cassandra-cli creates the example Keyspace specified by conf/schema-sample.txt

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-2390.
---------------------------------------

    Resolution: Fixed

fixed in r1085877 by adding comparator=UTF8Type to the CF definition.  Thanks for catching that!

> 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
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7.5
>
>   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