public static byte[] serializeMobFileRefs(SetMultimap<TableName, String> mobRefSet) {
    if (mobRefSet != null && mobRefSet.size() > 0) {
      // Here we rely on the fact that '/' and ',' are not allowed in either table names nor hfile
      // names for serialization.
      //
      // exampleTable/filename1,filename2//example:table/filename5//otherTable/filename3,filename4
      //
      // to approximate the needed capacity we use the fact that there will usually be 1 table name
      // and each mob filename is around 105 bytes. we pick an arbitrary number to cover "most"
      // single table name lengths
      StringBuilder sb = new StringBuilder(100 + mobRefSet.size() * 105);
      boolean doubleSlash = false;
      for (TableName tableName : mobRefSet.keySet()) {
        if (doubleSlash) {
          sb.append("//");
        } else {
          doubleSlash = true;
        }
        sb.append(tableName).append("/");
        boolean comma = false;
        for (String refs : mobRefSet.get(tableName)) {
          if (comma) {
            sb.append(",");
          } else {
            comma = true;
          }
          sb.append(refs);
        }
      }
      return Bytes.toBytes(sb.toString());
    } else {
      return HStoreFile.NULL_VALUE;
    }
  }
Serialize a set of referenced mob hfiles
@param mobRefSet to serialize, may be null
@return byte array to i.e. put into store file metadata. will not be null
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java