@Override
  public void addNotificationEvent(NotificationEvent entry) throws MetaException {
    boolean commited = false;
    Query query = null;
    try {
      pm.flush();
      openTransaction();
      lockNotificationSequenceForUpdate();
      query = pm.newQuery(MNotificationNextId.class);
      Collection<MNotificationNextId> ids = (Collection) query.execute();
      MNotificationNextId mNotificationNextId = null;
      boolean needToPersistId;
      if (CollectionUtils.isEmpty(ids)) {
        mNotificationNextId = new MNotificationNextId(1L);
        needToPersistId = true;
      } else {
        mNotificationNextId = ids.iterator().next();
        needToPersistId = false;
      }
      entry.setEventId(mNotificationNextId.getNextEventId());
      mNotificationNextId.incrementEventId();
      if (needToPersistId) {
        pm.makePersistent(mNotificationNextId);
      }
      pm.makePersistent(translateThriftToDb(entry));
      commited = commitTransaction();
    } catch (MetaException e) {
      LOG.error("Couldn't get lock for update", e);
      throw e;
    } finally {
      rollbackAndCleanup(commited, query);
    }
  }
Get partition's column stats

@return Map of column name and its stats
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java