Created
September 25, 2012 18:41
-
-
Save jessicaowensby/3783634 to your computer and use it in GitHub Desktop.
Does the Hector BatchMutator object allow for batch inserts of Composite Columns?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Composite composite = new Composite(); | |
composite.addComponent("abc",ser); | |
composite.addComponent("123", StringSerializer.get()); | |
HColumn<Composite, String> col = HFactory.createColumn(composite, "xyz", new CompositeSerializer(), ser); | |
Column cassandraColumn = new Column(); | |
cassandraColumn.setName(col.getNameBytes()); | |
cassandraColumn.setValue(col.getValueBytes()); | |
cassandraColumn.setTimestamp(System.currentTimeMillis()); | |
batchMutate.addInsertion("myKey", "MyColumnFamily", cassandraColumn); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment