@AutoService(value=ExpansionService.ExpansionServiceRegistrar.class) public static class ExpansionService.ExternalTransformRegistrarLoader extends java.lang.Object implements ExpansionService.ExpansionServiceRegistrar
ExternalTransformRegistrar
.Constructor and Description |
---|
ExternalTransformRegistrarLoader() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,ExpansionService.TransformProvider> |
knownTransforms() |
static <ConfigT> ConfigT |
payloadToConfig(org.apache.beam.model.pipeline.v1.ExternalTransforms.ExternalConfigurationPayload payload,
java.lang.Class<ConfigT> configurationClass)
Attempt to create an instance of
ConfigT from an ExternalTransforms.ExternalConfigurationPayload . |
public java.util.Map<java.lang.String,ExpansionService.TransformProvider> knownTransforms()
knownTransforms
in interface ExpansionService.ExpansionServiceRegistrar
public static <ConfigT> ConfigT payloadToConfig(org.apache.beam.model.pipeline.v1.ExternalTransforms.ExternalConfigurationPayload payload, java.lang.Class<ConfigT> configurationClass)
ConfigT
from an ExternalTransforms.ExternalConfigurationPayload
. If a schema is registered for ConfigT
this method will
attempt to ise it. Throws an IllegalArgumentException
if the schema in payload
is not assignable to
the registered schema.
If no Schema is registered, ConfigT
must have a zero-argument constructor and
setters corresponding to each field in the row encoded by payload
. Note ConfigT
may have additional setters not represented in the schema.
Exposed for testing only. No backwards compatibility guarantees.