private void reprintLineWithColorAsBold(String line, Ansi.Color color) {
    out.print(ansi().eraseLine(Ansi.Erase.ALL).fg(color).bold().a(line).a('\n').boldOff().reset()
      .toString());
    out.flush();
    lines++;
  }
NOTE: Use this method only if isUnixTerminal is true.
Erases the current line and prints the given line with the specified color.

@param line  - line to print
@param color - color for the line
common/src/java/org/apache/hadoop/hive/common/log/InPlaceUpdate.java