use of org.apache.beam.sdk.schemas.io.SchemaIOProvider in project beam by apache.
the class ExternalSchemaIOTransformRegistrar method knownBuilderInstances.
@Override
public Map<String, ExternalTransformBuilder<?, ?, ?>> knownBuilderInstances() {
ImmutableMap.Builder builder = ImmutableMap.<String, ExternalTransformRegistrar>builder();
try {
for (SchemaIOProvider schemaIOProvider : ServiceLoader.load(SchemaIOProvider.class)) {
builder.put("beam:transform:org.apache.beam:schemaio_" + schemaIOProvider.identifier() + "_read:v1", new ReaderBuilder(schemaIOProvider));
builder.put("beam:transform:org.apache.beam:schemaio_" + schemaIOProvider.identifier() + "_write:v1", new WriterBuilder(schemaIOProvider));
}
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
return builder.build();
}
Aggregations