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 8239981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:19:57+00:00 2026-06-07T20:19:57+00:00

I need to store benchmark runs for each nightly builds. To do this, i

  • 0

I need to store benchmark runs for each nightly builds. To do this, i came up with the following data model.

BenchmarkColumnFamily= {

   build_1: {
       (Run1, TPS) : 1000K
       (Run1, Latency) : 0.5ms
       (Run2, TPS) : 1000K
       (Run2, Latency) : 0.5ms
       (Run3, TPS) : 1000K
       (Run3, Latency) : 0.5ms
    }

    build_2: {
       ...
    }
...

}

To create such a schema, i came up with the following command on cassandra-cli:

create column family BenchmarkColumnFamily with 
    comparator = 'CompositeType(UTF8Type,UTF8Type)' AND 
    key_validation_class=UTF8Type AND
    default_validation_class=UTF8Type AND
    column_metadata = [
    {column_name: TPS, validation_class: UTF8Type}
    {column_name: Latency, validation_class: UTF8Type}
    ];

Does the above command create the schema i intend to create? The reason for my confusion is that, when i insert data into the above CF using:
set BenchmarkColumnFamily['1545']['TPS']='100';
it gets inserted successfully even though the comparator type is composite. Furthermore, even the following command gets executed successfully

set BenchmarkColumnFamily['1545']['Run1:TPS']='1000';

What is it that im missing?

  • 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-07T20:19:58+00:00Added an answer on June 7, 2026 at 8:19 pm

    I don’t think you’re doing anything wrong. The CLI is parsing the strings for values based on the type, probably using org.apache.cassandra.db.marshal.AbstractType<T>.fromString(). And for Composite types, it uses ‘:’ as field separator (not that I’ve seen documented, but I’ve experimented with Java code to convince myself.

    Without a ‘:’, it seems to just set the first part of the Composite, and leave the second as null. To set the second only, you can use

    set BenchmarkColumnFamily['1545'][':NOT_TPS']='999';
    

    From the CLI, dump out the CF:

    list BenchmarkColumnFamily;
    

    and you should see all the names (for all the rows), e.g.

    RowKey: 1545
    => (column=:NOT_TPS, value=999, timestamp=1342474086048000)
    => (column=Run1:TPS, value=1000, timestamp=1342474066695000)
    => (column=TPS, value=100, timestamp=1342474057824000)
    

    There is no way (via CLI) to constrain the composite elements to be non-null or specific values, that’s something you’d have to do in code.

    Also, the column_metadata option for the CF creation is unnecessary, since you’ve already listed the default validation as UTF8Type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to store data in a grid like this: {0,1,2,3} {4,5,6,7} {8,9,10,11} {12,13,14,15}
Need to store some valuable data securely on Mac and access it with my
I need to store abitrary binary data (essentially files of various common formats, JPEG,
So, for performance reasons, I need my app to store big arrays of data
I need to store sparse matrix data. Size of data is 10^6 10^4 columns.
I need to store a multi-dimensional associative array of data in a flat file
Graph databases store data as nodes, properties and relations. If I need to retrieve
I need to store historical data for something in mysql (only last 7 days)
I need to store some data in a cookie. The data goes through mcrypt
I need to store an unknown number of groups. Each group has an unknown

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.