public void registerDag(String applicationId, int dagId, String user,
      Credentials credentials) {
    Token<JobTokenIdentifier> jobToken = TokenCache.getSessionToken(credentials);

    QueryIdentifier queryIdentifier = new QueryIdentifier(applicationId, dagId);
    ReadWriteLock dagLock = getDagLock(queryIdentifier);
    dagLock.readLock().lock();
    try {
      ShuffleHandler.get()
          .registerDag(applicationId, dagId, jobToken, user, null);
    } finally {
      dagLock.readLock().unlock();
    }
  }
Register a new fragment for a specific query
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/QueryTracker.java