You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Juraj Sustek (JIRA)" <ji...@apache.org> on 2013/05/14 17:07:16 UTC

[jira] [Created] (CASSANDRA-5566) java/org/apache/cassandra/dht/BytesToken.java returns invalid string token (with prefix Token(bytes[" + Hex.bytesToHex(token) + "]))

Juraj Sustek created CASSANDRA-5566:
---------------------------------------

             Summary: java/org/apache/cassandra/dht/BytesToken.java returns invalid string token (with prefix   Token(bytes[" + Hex.bytesToHex(token) + "]))
                 Key: CASSANDRA-5566
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5566
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.4
         Environment: debian x86_64 GNU/Linux, eff3c455ac73ac482a6fcf5cec111abc  apache-cassandra-1.2.4-src.tar.gz
            Reporter: Juraj Sustek
            Priority: Minor


BytesToken java class method toString returns invalid token. 
Changing java/org/apache/cassandra/dht/BytesToken.java
line 44 from:
return "Token(bytes[" + Hex.bytesToHex(token) + "])";
to:
return Hex.bytesToHex(token);
shuffle works fine.

when you run:
./cassandra-shuffle -h localhost create
cassandra throws:
Exception in thread "main" java.lang.NumberFormatException: Non-hex characters in Token(bytes[d439e5e5ad484679a0c1f045fea7b2a3])
        at org.apache.cassandra.utils.Hex.hexToBytes(Hex.java:60)
        at org.apache.cassandra.dht.AbstractByteOrderedPartitioner$1.fromString(AbstractByteOrderedPartitioner.java:168)
        at org.apache.cassandra.tools.Shuffle.createShuffleBatchInsert(Shuffle.java:580)
        at org.apache.cassandra.tools.Shuffle.shuffle(Shuffle.java:358)
        at org.apache.cassandra.tools.Shuffle.main(Shuffle.java:678)


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira