public static byte[] isLegalColumnFamilyName(final byte[] b) {
    if (b == null) {
      return null;
    }
    Preconditions.checkArgument(b.length != 0, "Column Family name can not be empty");
    if (b[0] == '.') {
      throw new IllegalArgumentException(
        "Column Family names cannot start with a " + "period: " + Bytes.toString(b));
    }
    for (int i = 0; i < b.length; i++) {
      if (Character.isISOControl(b[i]) || b[i] == ':' || b[i] == '\\' || b[i] == '/') {
        throw new IllegalArgumentException("Illegal character <" + b[i]
          + ">. Column Family names cannot contain control characters or colons: "
          + Bytes.toString(b));
      }
    }
    byte[] recoveredEdit = Bytes.toBytes(HConstants.RECOVERED_EDITS_DIR);
    if (Bytes.equals(recoveredEdit, b)) {
      throw new IllegalArgumentException(
        "Column Family name cannot be: " + HConstants.RECOVERED_EDITS_DIR);
    }
    return b;
  }
Check if the column family name is legal.
@param b Family name.
@return <code>b</code>
@throws IllegalArgumentException If not null and not a legitimate family name: i.e. 'printable'
                                 and ends in a ':' (Null passes are allowed because
                                 <code>b</code> can be null when deserializing). Cannot start
                                 with a '.' either. Also Family can not be an empty value or
                                 equal "recovered.edits".
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ColumnFamilyDescriptorBuilder.java