public static ByteBuffer serializeServiceData(Token<JobTokenIdentifier> jobToken) throws IOException {
    //TODO these bytes should be versioned
    DataOutputBuffer jobToken_dob = new DataOutputBuffer();
    jobToken.write(jobToken_dob);
    return ByteBuffer.wrap(jobToken_dob.getData(), 0, jobToken_dob.getLength());
  }
A helper function to serialize the JobTokenIdentifier to be sent to the
ShuffleHandler as ServiceData.
@param jobToken the job token to be used for authentication of
shuffle data requests.
@return the serialized version of the jobToken.
llap-server/src/java/org/apache/hadoop/hive/llap/shufflehandler/ShuffleHandler.java