Example usage for org.apache.hadoop.util StringUtils COMMA

List of usage examples for org.apache.hadoop.util StringUtils COMMA

Introduction

In this page you can find the example usage for org.apache.hadoop.util StringUtils COMMA.

Prototype

char COMMA

To view the source code for org.apache.hadoop.util StringUtils COMMA.

Click Source Link

Usage

From source file:com.github.dryangkun.hbase.tidx.hive.HBaseSerDeHelper.java

License:Apache License

/**
 * Trims by removing the trailing "," if any
 * /* www  . ja  v a  2s .c o  m*/
 * @param sb StringBuilder to trim
 * @return StringBuilder trimmed StringBuilder
 * */
private static StringBuilder trim(StringBuilder sb) {
    if (sb.charAt(sb.length() - 1) == StringUtils.COMMA) {
        return sb.deleteCharAt(sb.length() - 1);
    }

    return sb;
}