2

I have a CQL 3 CF

CREATE TABLE entries (
  id text,
  va text,
  ts bigint,
  idxc blob,
  PRIMARY KEY (id, va, ts)
);

And with pelops I get for an insert of Bytes( [0, 4, 0, 0, 0, 4, 0, 0, 8, 0, 0, 1, 55, -56, -41, 6, 14, 0, 0, 16, 65, 50, 82, 97, 84, 85, 95, 82, 72, 71, 115, 69, 89, 115, 100, 49, 0, 0, 8, 0, 4, -63, -24, -121, -16, 35, -80, 0, 0, 2, 105, 103, 0]) this Exception:

org.scale7.cassandra.pelops.exceptions.InvalidRequestException: (String didn't validate.)[ks][entries][aKey:1339104364078000:idxc] failed validation
    at org.scale7.cassandra.pelops.exceptions.IExceptionTranslator$ExceptionTranslator.translate(IExceptionTranslator.java:47)

I can insert other byte arrays with the same method.

Georg
  • 987
  • 8
  • 16
  • Are you sure you're specifying the correct column name in your insert? It looks like your byte array is being validated as a string, which would indicate that either the idxc column is being validated using UTF8Type or AsciiType, or you have specified one of the text columns inadvertently. – rs_atl Jun 12 '12 at 17:15
  • Column name works if I use a cli-json-style schema specification. – Georg Jun 23 '12 at 18:59

3 Answers3

0

Pelops might not support cql3-style composite primary keys yet. (Really, it's just the fact that the column metadata should only match against the last component of the composite column names.) I suggest checking with the Pelops devs.

Tyler Hobbs
  • 6,872
  • 24
  • 31
  • Pelops definitely DOES SUPPORT them. I can use pelops easily if I don't specify my schema in CQL (3). It's more a problem of the blob content. – Georg Jun 23 '12 at 19:00
0

I haven't worked with Pelops, so this is a shot in the dark, but verify that you're passing your mutator a byte[] (I notice a capital B in your OP), and if not, try a conversion to byte[] in the call. If there's no method signature for what you're passing, it may be accepting a toString() version of it and moving on.

phatfingers
  • 9,770
  • 3
  • 30
  • 44
  • Yeah, I tried a couple of content types. As I stated in my question: I can insert other byte arrays. – Georg Jun 23 '12 at 19:02
0

Let's close this: Conclusion: CQL 3 is still beta, do not expect it to be glitch-free.

I am using the old style schema definitions now without problems.

Georg
  • 987
  • 8
  • 16