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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:21:12+00:00 2026-06-11T19:21:12+00:00

I have some various IDs related to each row: let’s say, 1001 , and

  • 0

I have some various IDs related to each row: let’s say, 1001, and 1002. Each of these IDs has a similar set of attributes.

So my thought is to have one column family (‘cf’) with column qualifiers as such:

cf:1001-attribute1 -> 'value a'
cf:1001-attribute2 -> 'value b'
cf:1001-attribute3 -> 'value c'
cf:1002-attribute1 -> 'value d'
cf:1002-attribute2 -> 'value e'
cf:1002-attribute3 -> 'value f'

Am I able to scan for: row(x), column family (cf), columns (1001*) so that I pick up a map of all the attributes for 1001 in this case?

Obviously I can do this for row keys, I’m not sure if column qualifiers work the same.

  • 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-11T19:21:13+00:00Added an answer on June 11, 2026 at 7:21 pm

    You can use the ColumnPrefixFilter

    HTableInterface t = ...;
    byte[] prefix = Bytes.toBytes("1001");
    Scan scan = new Scan() 
    Filter f = new ColumnPrefixFilter(prefix);
    scan.setFilter(f);
    scan.setBatch(20); // set this if there could be many columns returned
    ResultScanner rs = t.getScanner(scan);
    for (Result r = rs.next(); r != null; r = rs.next()) {
      for (KeyValue kv : r.raw()) {
        // each kv represents a column
      }
    }
    rs.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data that has various attributes and I want to hierarchically group
I have two tables. One has some product details, the other holds various photos
We have some stuff that may be exported into various formats. Currently we have
I have an XML page with some elements in various languages - Arabic, English,
I have a Singleton to manage some variables I need in various places in
I have read various articles about passing variables around using RMI. Some of them
Quite some time i`ve learnt MVC. I have seen various techniques to post data
I have some fairly complex java programs with lots of if/else statements where various
I have some tables with various content. What I want to accomplish is to
I have some triggers on various tables that use raiserror to tell the user

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.