Hector Mutator

50 views
Skip to first unread message

Leandro Rodrigues Silva

unread,
May 20, 2013, 8:56:20 AM5/20/13
to hector...@googlegroups.com
Hello everybody!

I'm using hector for insert columns in runtime on cassandra. But this columns don't appear in metadata, so i need to retrieve that columns. It's possible?

follow my code:

 Keyspace keyspace = HFactory.createKeyspace(getDefaultKeySpace(), cluster);
        Mutator<String> mutator = HFactory.createMutator(keyspace, StringSerializer.get(), new BatchSizeHint(1, keyValuePairs.size()));
        for (Map.Entry<String, Object> entry : keyValuePairs.entrySet()) {
            String property = entry.getKey();
            Object value = entry.getValue();
            HColumn<String, Object> column = createColumn(property, value, StringSerializer.get(), new TypeConverterSerializer<Object>(value));
            mutator.addInsertion(key, colFamily, column);
        }
        mutator.execute();


any ideas??

thanks!!

Patricio Echagüe

unread,
May 20, 2013, 2:36:49 PM5/20/13
to hector-users
Leandro, I'm not able to understand you question. Are you trying to store some columns but they are not getting stored after the mutator.execute() returns ?


--
You received this message because you are subscribed to the Google Groups "hector-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hector-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Leandro Rodrigues Silva

unread,
May 21, 2013, 4:17:47 PM5/21/13
to hector...@googlegroups.com
They are stored, but don't appear on metadata of the column family.

I need in other time, to retrieve the columns that i created in runtime.

for example:

there is a column family like that:

CREATE TABLE users (
user_id text PRIMARY KEY,
first_name text,
last_name text,
emails text
);

but, if my application inserts a new column in runtime, like 'email2'. this one don't appear with user_id, first_name, last_name and emails.

are you understand?

thanks!
Reply all
Reply to author
Forward
0 new messages