int setSentGuaranteed() {
    // Only one send can be active at the same time.
    synchronized (actualState) {
      assert actualState.sending != -1;
      actualState.sent = actualState.sending;
      actualState.sending = -1;
      return (actualState.sent == actualState.target) ? -1 : actualState.target;
    }
  }
The actual state of the guaranteed task, and the update state, for the session.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/WmTezSession.java