String truncateTraceLog(String strParam) {
    if (LOG.isTraceEnabled()) {
      int traceLogMaxLength = getConf().getInt(TRACE_LOG_MAX_LENGTH, DEFAULT_TRACE_LOG_MAX_LENGTH);
      int truncatedLength =
        strParam.length() < traceLogMaxLength ? strParam.length() : traceLogMaxLength;
      String truncatedFlag = truncatedLength == strParam.length() ? "" : KEY_WORD_TRUNCATED;
      return strParam.subSequence(0, truncatedLength) + truncatedFlag;
    }
    return strParam.subSequence(0, 150) + KEY_WORD_TRUNCATED;
  }
Truncate to number of chars decided by conf hbase.ipc.trace.log.max.length if TRACE is on else
to 150 chars Refer to Jira HBASE-20826 and HBASE-20942
@param strParam stringifiedParam to be truncated
@return truncated trace log string
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java