private void init(ASTNode node){
    // -> ^(TOK_REPLICATION $replId $isMetadataOnly)
    setInReplicationScope(true);
    eventId = PlanUtils.stripQuotes(node.getChild(0).getText());
    if ((node.getChildCount() > 1)
            && node.getChild(1).getText().toLowerCase().equals("metadata")) {
      isMetadataOnly= true;
      try {
        if (Long.parseLong(eventId) >= 0) {
          // If metadata-only dump, then the state of the dump shouldn't be the latest event id as
          // the data is not yet dumped and shall be dumped in future export.
          currStateId = eventId;
        }
      } catch (Exception ex) {
        // Ignore the exception and fall through the default currentStateId
      }
    }
  }
Determines if a current replication event (based on event id) is allowed to
replicate-replace-into a given metastore object (based on state_id stored in their parameters)
ql/src/java/org/apache/hadoop/hive/ql/parse/ReplicationSpec.java