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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:40:39+00:00 2026-05-30T22:40:39+00:00

I need some clear examples how I can insert super columns in super column

  • 0

I need some clear examples how I can insert super columns in super column using thrift and java.

  • 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-05-30T22:40:40+00:00Added an answer on May 30, 2026 at 10:40 pm
    @Override
    public void insertAllReportsByHost(Map<String, List<IReport>> hostReports) throws DatabaseException {
        try {
            Cassandra.Client client = getClient();
    
            Map<ByteBuffer, Map<String, List<Mutation>>> mutationsMap = new HashMap<ByteBuffer, Map<String, List<Mutation>>>();
    
            for (Map.Entry<String, List<IReport>> entryReport : hostReports.entrySet()) {
    
                ByteBuffer host = toByteBuffer(entryReport.getKey());
                List<IReport> reports = entryReport.getValue();
                Map<String, List<Mutation>> keyMutations = new HashMap<String, List<Mutation>>();
                List<Mutation> mutations = new ArrayList<Mutation>();
    
                for (IReport report : reports) {
                    report.getProperties();
                    Column reportDataColumn = new Column(toByteBuffer("Report Data"));
                    reportDataColumn.setValue(toByteBuffer(report.toString()));//TODO make another way
                    reportDataColumn.setTimestamp(System.currentTimeMillis());
    
                    Long nano = System.nanoTime();
                    SuperColumn superColumn = new SuperColumn(toByteBuffer(report.getReportId().toString()), Arrays.asList(reportDataColumn));
                    ColumnOrSuperColumn col = new ColumnOrSuperColumn();
                    col.super_column = superColumn;
    
                    Mutation m = new Mutation();
                    m.setColumn_or_supercolumn(col);
    
                    mutations.add(m);
                }
    
    
                keyMutations.put(COLUMN_FAMILY, mutations);
    
                mutationsMap.put(host, keyMutations);
            }
    
            client.batch_mutate(mutationsMap, ConsistencyLevel.ONE);
    
        } catch (UnsupportedEncodingException e) {
            LOGGER.error(e.getMessage(), e);
            throw new DatabaseException(e);
        } catch (UnavailableException e) {
            LOGGER.error(e.getMessage(), e);
            throw new DatabaseException(e);
        } catch (TException e) {
            LOGGER.error(e.getMessage(), e);
            throw new DatabaseException(e);
        } catch (InvalidRequestException e) {
            LOGGER.error(e.getMessage(), e);
            throw new DatabaseException(e);
        } catch (TimedOutException e) {
            LOGGER.error(e.getMessage(), e);
            throw new DatabaseException(e);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some guidance figuring out what went wrong. I've been using mysql, phpmyadmin for
I need some help implementing threading using Python 2.1. I would readily update to
I need to decrypt some data files with wincrypt and examples are few and
All the examples I can find using DLLImport to call C++ code from C#
I need some advice/help on this, I can't see the wood from the trees
I need to remove some values from a hidden and text input box using
I need to do some clean up work when I am going to terminate
I need to do testing on clean machines frequently so I need some kind
Need some help about with Memcache. I have created a class and want to
Need some help, please. I have a line of horizontal thumbnails loaded as ONE

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.