class FilterMissingPartitionsLocationManager implements SourceLocationManager {

  @Override
  public List<Path> getPartitionLocations() throws CircusTrainException {
    List<Path> result = new ArrayList<>();
    List<Path> paths = sourceLocationManager.getPartitionLocations();
    FileSystem fileSystem = null;
    for (Path path : paths) {
      try {
        if (fileSystem == null) {
          fileSystem = path.getFileSystem(hiveConf);
        }
        if (fileSystem.exists(path)) {
          result.add(path);
        } else {
          LOG
              .warn("Source path '{}' does not exist skipping it for replication."
                  + " WARNING: this means there is a partition in Hive that does not have a corresponding folder in"
                  + " source file store, check your table and data.", path);
        }
      } catch (IOException e) {
        LOG.warn("Exception while checking path, skipping path '{}',  error {}", path, e);
      }
    }
    return result;
  }

  public  FilterMissingPartitionsLocationManager(SourceLocationManager sourceLocationManager, HiveConf hiveConf);

}