public static Entry<String,String> parseMapping(String columnSpec)
      throws InvalidColumnMappingException {
    int index = 0;
    while (true) {
      if (index >= columnSpec.length()) {
        log.error("Cannot parse '" + columnSpec + "' as colon-separated column configuration");
        throw new InvalidColumnMappingException(
            "Columns must be provided as colon-separated family and qualifier pairs");
      }

      index = columnSpec.indexOf(AccumuloHiveConstants.COLON, index);

      if (-1 == index) {
        log.error("Cannot parse '" + columnSpec + "' as colon-separated column configuration");
        throw new InvalidColumnMappingException(
            "Columns must be provided as colon-separated family and qualifier pairs");
      }

      // Check for an escape character before the colon
      if (index - 1 > 0) {
        char testChar = columnSpec.charAt(index - 1);
        if (AccumuloHiveConstants.ESCAPE == testChar) {
          // this colon is escaped, search again after it
          index++;
          continue;
        }

        // If the previous character isn't an escape characters, it's the separator
      }

      // Can't be escaped, it is the separator
      break;
    }

    String cf = columnSpec.substring(0, index), cq = columnSpec.substring(index + 1);

    // Check for the escaped colon to remove before doing the expensive regex replace
    if (-1 != cf.indexOf(AccumuloHiveConstants.ESCAPED_COLON)) {
      cf = cf.replaceAll(AccumuloHiveConstants.ESCAPED_COLON_REGEX,
          Character.toString(AccumuloHiveConstants.COLON));
    }

    // Check for the escaped colon to remove before doing the expensive regex replace
    if (-1 != cq.indexOf(AccumuloHiveConstants.ESCAPED_COLON)) {
      cq = cq.replaceAll(AccumuloHiveConstants.ESCAPED_COLON_REGEX,
          Character.toString(AccumuloHiveConstants.COLON));
    }

    return Maps.immutableEntry(cf, cq);
  }
Consumes the column mapping specification and breaks it into column family and column
qualifier.
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/columns/ColumnMappingFactory.java