public static void main(String[] args) throws HectorException {
final StringSerializer serializer = StringSerializer.get();
Keyspace keyspace = null;
Cluster cluster = HFactory.getOrCreateCluster("test", "192.168.1.3:9160");
keyspace = HFactory.createKeyspace("sample", cluster);
try {
Mutator
m.addInsertion("testbatch", "feed", HFactory.createStringColumn("Type", "somevalue"));
m.addInsertion("testbatch", "feed", HFactory.createStringColumn("TypeBatch", "somevalue"));
m.execute();
} catch(Exception e) {
e.printStackTrace();
}
}
No comments:
Post a Comment