use of org.flyte.jflyte.api.FileSystemRegistrar in project flytekit-java by flyteorg.
the class FileSystemLoader method loadFileSystems.
static List<FileSystem> loadFileSystems() {
ServiceLoader<FileSystemRegistrar> loader = ServiceLoader.load(FileSystemRegistrar.class);
LOG.debug("Discovering FileSystemRegistrar");
List<FileSystem> fileSystems = new ArrayList<>();
Map<String, String> env = ImmutableMap.copyOf(System.getenv());
for (FileSystemRegistrar registrar : loader) {
for (FileSystem fileSystem : registrar.load(env)) {
LOG.debug(String.format("Discovered FileSystem [%s]", fileSystem.getClass().getName()));
fileSystems.add(fileSystem);
}
}
return fileSystems;
}
Aggregations