Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8601507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:51:38+00:00 2026-06-12T01:51:38+00:00

I am trying out some basic queries with Cassandra CounterColumnFamily from the cli. I

  • 0

I am trying out some basic queries with Cassandra CounterColumnFamily from the cli. I basically have a column family ‘page_view_counts’ with Row Key as url. Each row has 3 counts (impressions, conversions and revenue) associated with it. I have indexed one of the counts as I want to retrieve rows with conversion > 10 etc.

This is output for describe page_view_counts:

  ColumnFamily: page_view_counts
  Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
  Default column value validator: org.apache.cassandra.db.marshal.CounterColumnType
  Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
  GC grace seconds: 864000
  Compaction min/max thresholds: 4/32
  Read repair chance: 0.1
  DC Local Read repair chance: 0.0
  Replicate on write: true
  Caching: KEYS_ONLY
  Bloom Filter FP chance: default
  Column Metadata:
    Column Name: conversion
      Validation Class: org.apache.cassandra.db.marshal.CounterColumnType
      Index Name: page_view_counts_conversion_idx
      Index Type: KEYS
  Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
  Compression Options:
    sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor

some sample data in my column family:

RowKey: row27
=> (counter=conversion, value=27000)
=> (counter=impression, value=54000)
=> (counter=revenue, value=81000)
------------------- 
RowKey: row29
=> (counter=conversion, value=29000)
=> (counter=impression, value=58000)
=> (counter=revenue, value=87000)
------------------- 
RowKey: row81
=> (counter=conversion, value=81000)
=> (counter=impression, value=162000)
=> (counter=revenue, value=243000)

But I am getting these errors when I do the following queries :

[default@hector] get page_view_counts where conversion>23;
invalid operation for commutative columnfamily page_view_counts
[default@hector] get page_view_counts where conversion=long('1000');
invalid operation for commutative columnfamily page_view_counts
[default@hector] get page_view_counts where conversion=1000;
invalid operation for commutative columnfamily page_view_counts
[default@hector] get page_view_counts where KEY='row81';
java.lang.NumberFormatException: An hex string representing bytes must have an even length
[default@hector] get page_view_counts where KEY=bytes('row81');
java.lang.RuntimeException: java.lang.RuntimeException: org.apache.cassandra.db.marshal.MarshalException: cannot parse 'row81' as hex bytes
[default@hector] get page_view_counts where KEY=utf8('row81');
invalid operation for commutative columnfamily page_view_counts

Can someone please help me with this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:51:40+00:00Added an answer on June 12, 2026 at 1:51 am

    Try this:

    assume page_view_counts keys as UTF8Type;
    get page_view_counts['row81'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying out some basic exercises involving loops. Can someone tell me
I am trying out some examples with analytical functions and i have created a
Rather new to REST and Jersey, and I'm trying out some basic examples. I've
I have some basic knowledge of Mod Rewrite, but I can't figure this out!
Im trying to append some JSON data from the last.fm API, I have been
I am new to the ROR, and I am trying out some basic syntax
I'm still trying to figure out Raphael and am stuck with some basic animation.
I'm trying to perform some basic analysis on Lotto results :) I have a
I am trying to access some basic info from an XML based API. I'm
I am trying to do some basic table retrieval from sqlite and I keep

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.