private void addHBaseDelegationToken(Configuration conf) throws IOException, MetaException {
    if (User.isHBaseSecurityEnabled(conf)) {
      Connection connection = ConnectionFactory.createConnection(hbaseConf);
      try {
        User curUser = User.getCurrent();
        Job job = new Job(conf);
        TokenUtil.addTokenForJob(connection, curUser, job);
      } catch (InterruptedException e) {
        throw new IOException("Error while obtaining hbase delegation token", e);
      } finally {
        if (connection != null) {
          connection.close();
        }
      }
    }
  }
Utility method to add hbase-default.xml and hbase-site.xml properties to a new map
if they are not already present in the jobConf.
@param jobConf Job configuration
@param newJobProperties  Map to which new properties should be added
hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java