Example #1
0
 public static void addMutation(
     Mutation rm,
     String columnFamilyName,
     String superColumnName,
     long columnName,
     String value,
     long timestamp) {
   CellName cname =
       superColumnName == null
           ? CellNames.simpleDense(getBytes(columnName))
           : CellNames.compositeDense(ByteBufferUtil.bytes(superColumnName), getBytes(columnName));
   rm.add(columnFamilyName, cname, ByteBufferUtil.bytes(value), timestamp);
 }
 private void insert(String key) {
   Mutation rm;
   rm = new Mutation(KEYSPACE, ByteBufferUtil.bytes(key));
   rm.add(CF, Util.cellname("column"), ByteBufferUtil.bytes("asdf"), 0);
   rm.apply();
 }