@Override
    public String next() {
      try {
        FileStatus file = files[i];
        i++;
        return ReplChangeManager.getInstance(conf).encodeFileUri(file.getPath().toString(),
            ReplChangeManager.checksumFor(file.getPath(), fs), null);
      } catch (IOException | MetaException e) {
        throw new RuntimeException(e);
      }
    }
Filter for valid files only (no dir, no hidden)
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java