@Override
  public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations,
    long timestamp, Map<ByteBuffer, ByteBuffer> attributes) throws IOError, IllegalArgument {
    Table table = null;
    try {
      table = getTable(tableName);
      Put put = new Put(getBytes(row), timestamp);
      addAttributes(put, attributes);

      Delete delete = new Delete(getBytes(row));
      addAttributes(delete, attributes);
      if (metrics != null) {
        metrics.incNumRowKeysInBatchMutate(mutations.size());
      }

      // I apologize for all this mess :)
      CellBuilder builder = CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY);
      for (Mutation m : mutations) {
        byte[][] famAndQf = CellUtil.parseColumn(getBytes(m.column));
        if (m.isDelete) {
          if (famAndQf.length == 1) {
            delete.addFamily(famAndQf[0], timestamp);
          } else {
            delete.addColumns(famAndQf[0], famAndQf[1], timestamp);
          }
          delete.setDurability(m.writeToWAL ? Durability.SYNC_WAL : Durability.SKIP_WAL);
        } else {
          if (famAndQf.length == 1) {
            LOG.warn("No column qualifier specified. Delete is the only mutation supported "
              + "over the whole column family.");
          } else {
            put.add(builder.clear().setRow(put.getRow()).setFamily(famAndQf[0])
              .setQualifier(famAndQf[1]).setTimestamp(put.getTimestamp()).setType(Cell.Type.Put)
              .setValue(m.value != null ? getBytes(m.value) : HConstants.EMPTY_BYTE_ARRAY).build());
          }
          put.setDurability(m.writeToWAL ? Durability.SYNC_WAL : Durability.SKIP_WAL);
        }
      }
      if (!delete.isEmpty()) {
        table.delete(delete);
      }
      if (!put.isEmpty()) {
        table.put(put);
      }
    } catch (IOException e) {
      LOG.warn(e.getMessage(), e);
      throw getIOError(e);
    } catch (IllegalArgumentException e) {
      LOG.warn(e.getMessage(), e);
      throw new IllegalArgument(Throwables.getStackTraceAsString(e));
    } finally {
      closeTable(table);
    }
  }
Note: this internal interface is slightly different from public APIs in regard to handling of
the qualifier. Here we differ from the public Java API in that null != byte[0]. Rather, we
respect qual == null as a request for the entire column family. The caller (
{@link #getVerTs(ByteBuffer, ByteBuffer, ByteBuffer, long, int, Map)}) interface IS consistent
in that the column is parse like normal.
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHBaseServiceHandler.java