private static String getBaseLocation(String jobIdString, int dagId, String user) {
    // $x/$user/appcache/$appId/${dagId}/output/$mapId
    // TODO: Once Shuffle is out of NM, this can use MR APIs to convert
    // between App and Job
    String parts[] = jobIdString.split("_");
    Preconditions.checkArgument(parts.length == 3, "Invalid jobId. Expecting 3 parts");
    final ApplicationId appID =
        ApplicationId.newInstance(Long.parseLong(parts[1]), Integer.parseInt(parts[2]));
    final String baseStr =
        USERCACHE_CONSTANT + "/" + user + "/"
            + APPCACHE_CONSTANT + "/"
            + ConverterUtils.toString(appID)
            +  "/" + dagId
            +  "/output" + "/";
    return baseStr;
  }
Unregister a specific dag

This method and registerDag must be synchronized externally to prevent races in shuffle token registration/unregistration

@param dir
@param applicationIdString
@param dagIdentifier
llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java