@Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj instanceof Action) {
      return compareTo((Action) obj) == 0;
    }
    return false;
  }
Creates an action for a particular replica from original action.
@param action    Original action.
@param replicaId Replica id for the new action.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Action.java