public static ReplicationProtos.TableCF[] convert(String tableCFsConfig) {
    if (tableCFsConfig == null || tableCFsConfig.trim().length() == 0) {
      return null;
    }

    ReplicationProtos.TableCF.Builder tableCFBuilder = ReplicationProtos.TableCF.newBuilder();
    List<String> tables = Splitter.on(';').splitToList(tableCFsConfig);
    List<ReplicationProtos.TableCF> tableCFList = new ArrayList<>(tables.size());

    for (String tab : tables) {
      // 1 ignore empty table config
      tab = tab.trim();
      if (tab.length() == 0) {
        continue;
      }
      // 2 split to "table" and "cf1,cf2"
      // for each table: "table#cf1,cf2" or "table"
      List<String> pair = Splitter.on(':').splitToList(tab);
      if (pair.size() > 2) {
        LOG.info("incorrect format:" + tableCFsConfig);
        continue;
      }
      assert pair.size() > 0;
      Iterator<String> i = pair.iterator();
      String tabName = i.next().trim();
      if (tabName.length() == 0) {
        LOG.info("incorrect format:" + tableCFsConfig);
        continue;
      }

      tableCFBuilder.clear();
      // split namespace from tableName
      String ns = "default";
      String tName = tabName;
      List<String> dbs = Splitter.on('.').splitToList(tabName);
      if (dbs != null && dbs.size() == 2) {
        Iterator<String> ii = dbs.iterator();
        ns = ii.next();
        tName = ii.next();
      }
      tableCFBuilder.setTableName(ProtobufUtil.toProtoTableName(TableName.valueOf(ns, tName)));

      // 3 parse "cf1,cf2" part to List<cf>
      if (i.hasNext()) {
        List<String> cfsList = Splitter.on(',').splitToList(i.next());
        for (String cf : cfsList) {
          String cfName = cf.trim();
          if (cfName.length() > 0) {
            tableCFBuilder.addFamilies(ByteString.copyFromUtf8(cfName));
          }
        }
      }
      tableCFList.add(tableCFBuilder.build());
    }
    return tableCFList.toArray(new ReplicationProtos.TableCF[tableCFList.size()]);
  }
Convert string to TableCFs Object. This is only for read TableCFs information from TableCF
node. Input String Format: ns1.table1:cf1,cf2;ns2.table2:cfA,cfB;ns3.table3.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationPeerConfigUtil.java