public boolean registerForFinishableStateUpdates(FinishableStateUpdateHandler handler,
                                                boolean lastFinishableState) {
    List<String> sourcesOfInterest = new LinkedList<>();
    List<IOSpecProto> inputSpecList = vertexSpec.getInputSpecsList();
    if (inputSpecList != null && !inputSpecList.isEmpty()) {
      for (IOSpecProto inputSpec : inputSpecList) {
        if (LlapTezUtils.isSourceOfInterest(inputSpec.getIoDescriptor().getClassName())) {
          sourcesOfInterest.add(inputSpec.getConnectedVertexName());
        }
      }
    }
    return queryInfo.registerForFinishableStateUpdates(handler, sourcesOfInterest, this,
        lastFinishableState);
  }
@param handler
@param lastFinishableState
@return true if the current state is the same as the lastFinishableState. false if the state has already changed.
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/QueryFragmentInfo.java