code: private static void addColumnsToOperation(Collection<String> columns, Operation operation) {
      // Keep track of whole family additions
      Set<String> familySet = new HashSet<String>();
  
      // Iterate through each of the required columns
      for (String column : columns) {
  
        // Split the column by : (family : column)
        String[] familyAndColumn = column.split(":");
  
        // Check if this is a family only
        if (familyAndColumn.length == 1) {
          // Add family to whole family additions, and add to scanner
          familySet.add(familyAndColumn[0]);
          operation.addFamily(Bytes.toBytes(familyAndColumn[0]));
        } else {
          // Add this column, as long as it's entire family wasn't added.
          if (!familySet.contains(familyAndColumn[0])) {
            operation.addColumn(Bytes.toBytes(familyAndColumn[0]), Bytes.toBytes(familyAndColumn[1]));
          }
        }
      }
    }
docs: Add a Collection of Columns to an Operation, Only Add Single Columns
  If Their Family Isn't Already Being Added.
  @param columns
  Collection of columns to add to the operation
  @param operation
  The HBase operation to add the columns to