private void repositionCursor() {
    if (lines > 0) {
      out.print(ansi().cursorUp(lines).toString());
      out.flush();
      lines = 0;
    }
  }
NOTE: Use this method only if isUnixTerminal is true.
Repositions the cursor back to line 0.
common/src/java/org/apache/hadoop/hive/common/log/InPlaceUpdate.java