private void sendFakeShuffleHeaderWithError(ChannelHandlerContext ctx, String message,
        HttpResponse response) throws IOException {
      FullHttpResponse fullResponse =
          new DefaultFullHttpResponse(response.getProtocolVersion(), response.getStatus());
      fullResponse.headers().set(response.headers());

      ShuffleHeader header = new ShuffleHeader(message, -1, -1, -1);
      DataOutputBuffer out = new DataOutputBuffer();
      header.write(out);

      sendError(ctx, wrappedBuffer(out.getData(), 0, out.getLength()), fullResponse);
    }
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