@Override public RunnerApi.PTransform translate( AppliedPTransform<?, ?, ?> appliedPTransform, List<AppliedPTransform<?, ?, ?>> subtransforms, SdkComponents components) throws IOException { return translateAppliedPTransform(appliedPTransform, subtransforms, components).build(); } }
@Override public RunnerApi.PTransform translate( AppliedPTransform<?, ?, ?> appliedPTransform, List<AppliedPTransform<?, ?, ?>> subtransforms, SdkComponents components) throws IOException { RunnerApi.PTransform.Builder transformBuilder = translateAppliedPTransform(appliedPTransform, subtransforms, components); FunctionSpec spec = KNOWN_PAYLOAD_TRANSLATORS .get(appliedPTransform.getTransform().getClass()) .translate(appliedPTransform, components); if (spec != null) { transformBuilder.setSpec(spec); } return transformBuilder.build(); } }
@Override public RunnerApi.PTransform translate( AppliedPTransform<?, ?, ?> appliedPTransform, List<AppliedPTransform<?, ?, ?>> subtransforms, SdkComponents components) throws IOException { RunnerApi.PTransform.Builder transformBuilder = translateAppliedPTransform(appliedPTransform, subtransforms, components); PTransform<?, ?> transform = appliedPTransform.getTransform(); // The raw transform was parsed in the context of other components; this puts it in the // context of our current serialization FunctionSpec spec = ((RawPTransform<?, ?>) transform).migrate(components); // A composite transform is permitted to have a null spec. There are also some pseudo- // primitives not yet supported by the portability framework that have null specs if (spec != null) { transformBuilder.setSpec(spec); } return transformBuilder.build(); } }
throws IOException { RunnerApi.PTransform.Builder builder = PTransformTranslation.translateAppliedPTransform( appliedPTransform, subtransforms, components);