public AuthenticationToken getDelegationToken(Connector conn) throws IOException {
    try {
      DelegationTokenConfig config = new DelegationTokenConfig();
      return conn.securityOperations().getDelegationToken(config);
    } catch (AccumuloException | AccumuloSecurityException e) {
      throw new IOException("Failed to obtain DelegationToken", e);
    }
  }
Obtain a DelegationToken from Accumulo.

@param conn
         The Accumulo connector
@return The DelegationToken instance
@throws IOException
          If the token cannot be obtained
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/HiveAccumuloHelper.java