public class ExecutableStageTranslation
extends java.lang.Object
ExecutableStage
s to and from RunnerApi
protocol buffers.Constructor and Description |
---|
ExecutableStageTranslation() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
generateNameFromStagePayload(org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload stagePayload) |
static java.lang.String |
generateNameFromTransformNames(java.util.Collection<java.lang.String> names,
boolean truncateSiblingComposites)
Creates a human-readable name for a set of stage names that occur in a single stage.
|
static org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload |
getExecutableStagePayload(AppliedPTransform<?,?,?> appliedTransform)
Extracts an
RunnerApi.ExecutableStagePayload from the given transform. |
public static org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload getExecutableStagePayload(AppliedPTransform<?,?,?> appliedTransform) throws java.io.IOException
RunnerApi.ExecutableStagePayload
from the given transform.java.io.IOException
public static java.lang.String generateNameFromStagePayload(org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload stagePayload)
public static java.lang.String generateNameFromTransformNames(java.util.Collection<java.lang.String> names, boolean truncateSiblingComposites)
This name reflects the nested structure of the stages, as inferred by slashes in the stage names. Sibling stages will be listed as {A, B}, nested stages as A/B, and according to the value of truncateSiblingComposites the nesting stops at the first level that siblings are encountered.
This is best understood via examples, of which there are several in the tests for this class.
names
- a list of full stage names in this fused operationtruncateSiblingComposites
- whether to recursively descent into composite operations that
have simblings, or stop the recursion at that level.