public void addWriteNotificationLog(Table tbl, Map<String, String> partitionSpec,
                                       List<FileStatus> newFiles, Long writeId,
                                       List<WriteNotificationLogRequest> requestList) throws HiveException {
    if (!conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML)) {
      LOG.debug("write notification log is ignored as dml event logging is disabled");
      return;
    }

    if (tbl.isTemporary()) {
      LOG.debug("write notification log is ignored as " + tbl.getTableName() + " is temporary : " + writeId);
      return;
    }

    if (newFiles == null || newFiles.isEmpty()) {
      LOG.debug("write notification log is ignored as file list is empty");
      return;
    }

    LOG.debug("adding write notification log for operation " + writeId + " table " + tbl.getCompleteName() +
                        "partition " + partitionSpec + " list of files " + newFiles);

    try {
      Long txnId = SessionState.get().getTxnMgr().getCurrentTxnId();
      List<String> partitionVals = null;
      if (partitionSpec != null && !partitionSpec.isEmpty()) {
        partitionVals = new ArrayList<>();
        for (FieldSchema fs : tbl.getPartitionKeys()) {
          partitionVals.add(partitionSpec.get(fs.getName()));
        }
      }

      addWriteNotificationLog(conf, tbl, partitionVals, txnId, writeId, newFiles, requestList);
    } catch (IOException | TException e) {
      throw new HiveException(e);
    }
  }
Returns partition metadata

@param tbl
         the partition's table
@param partSpec
         partition keys and values
@param forceCreate
         if this is true and partition doesn't exist then a partition is
         created
@param partPath the path where the partition data is located
@param inheritTableSpecs whether to copy over the table specs for if/of/serde
@return result partition object or null if there is no partition
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java