示例#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);
 }
示例#2
0
 public static CellName cellname(ByteBuffer... bbs) {
   if (bbs.length == 1) return CellNames.simpleDense(bbs[0]);
   else return CellNames.compositeDense(bbs);
 }
示例#3
0
 public static RangeTombstone tombstone(
     String start, String finish, long timestamp, int localtime) {
   Composite startName = CellNames.simpleDense(ByteBufferUtil.bytes(start));
   Composite endName = CellNames.simpleDense(ByteBufferUtil.bytes(finish));
   return new RangeTombstone(startName, endName, timestamp, localtime);
 }
示例#4
0
 public static CellName cellname(long l) {
   return CellNames.simpleDense(ByteBufferUtil.bytes(l));
 }
示例#5
0
 public static CellName cellname(int i) {
   return CellNames.simpleDense(ByteBufferUtil.bytes(i));
 }