private static StringBuilder trim(StringBuilder sb) {
    if (sb.charAt(sb.length() - 1) == StringUtils.COMMA) {
      return sb.deleteCharAt(sb.length() - 1);
    }

    return sb;
  }
Trims by removing the trailing "," if any

@param sb StringBuilder to trim
@return StringBuilder trimmed StringBuilder
hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseSerDeHelper.java