Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
None
-
Low
Description
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:
... schemas agree across the cluster
Line 9 => org.apache.cassandra.db.marshal.MarshalException: cannot parse 'birthdate' as hex bytes
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.
BytesType.java
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); } }