public final class SbeSchema
extends java.lang.Object
implements java.io.Serializable
The schema represents a single SBE message. If the XML schema contains more than one message, then a new instance must be created for each message that the pipeline will work with.
The currently supported ways of generating a schema are:
Ir
).
An Ir
allows for a reflection-less way of getting a very accurate representation of
the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
ambiguities, such as which message to base the schema around, passing SbeSchema.IrOptions
is
required.
Modifier and Type | Class and Description |
---|---|
static class |
SbeSchema.IrOptions
Options for configuring schema generation from an
Ir . |
Modifier and Type | Method and Description |
---|---|
static SbeSchema |
fromIr(Ir ir,
SbeSchema.IrOptions irOptions)
Creates a new
SbeSchema from the given intermediate representation. |
@Nullable Ir |
getIr() |
@Nullable SbeSchema.IrOptions |
getIrOptions() |
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList<org.apache.beam.sdk.extensions.sbe.SbeField> |
getSbeFields() |
public static SbeSchema fromIr(Ir ir, SbeSchema.IrOptions irOptions)
SbeSchema
from the given intermediate representation.
This makes no guarantees about the state of the returned instance. That is, it may or may not have the generated SBE schema representation, and it may or may not have translated the SBE schema into a Beam schema.
ir
- the intermediate representation of the SBE schema. Modifications to the passed-in
value will not be reflected in the returned instance.irOptions
- options for configuring how to deal with cases where the desired behavior is
ambiguous.SbeSchema
instancepublic @Nullable Ir getIr()
public @Nullable SbeSchema.IrOptions getIrOptions()
public org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList<org.apache.beam.sdk.extensions.sbe.SbeField> getSbeFields()