Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-5566

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.5
    • None
    • None
    • debian x86_64 GNU/Linux, eff3c455ac73ac482a6fcf5cec111abc apache-cassandra-1.2.4-src.tar.gz

    • Low

    Description

      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)

      Attachments

        Activity

          People

            juras Juraj Sustek
            juras Juraj Sustek
            Juraj Sustek
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: