public Token<?> getAccumuloToken(UserGroupInformation user) {
    checkNotNull(user, "Provided UGI was null");
    Collection<Token<? extends TokenIdentifier>> tokens = user.getTokens();
    for (Token<?> token : tokens) {
      if (ACCUMULO_SERVICE.equals(token.getKind())) {
        return token;
      }
    }
    return null;
  }
Extract the appropriate Token for Accumulo from the provided {@code user} and add it to the
{@link JobConf}'s credentials.

@param user
         User containing tokens
@param jobConf
         The configuration for the job
@throws IOException
          If the correct token is not found or the Token fails to be merged with the
          configuration
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/HiveAccumuloHelper.java