protected void validateEventType(HCatNotificationEvent event, String allowedEventType) {
    if (event == null || !allowedEventType.equals(event.getEventType())){
      throw new IllegalStateException(this.getClass().getName() + " valid only for " +
          allowedEventType + " events.");
    }
  }
Returns a Iterable&lt;Command&gt; to send to a hive driver on the source warehouse

If you *need* a List&lt;Command&gt; instead, you can use guava's
ImmutableList.copyOf(iterable) or Lists.newArrayList(iterable) to
get the underlying list, but this defeats the purpose of making this
interface an Iterable rather than a List, since it is very likely
that the number of Commands returned here will cause your process
to run OOM.
hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationTask.java