Class SbeSchema

java.lang.Object
org.apache.beam.sdk.extensions.sbe.SbeSchema
All Implemented Interfaces:
Serializable

public final class SbeSchema extends Object implements Serializable
Represents an SBE schema.

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:

  • Through an intermediate representation (Ir).

Intermediate Representation

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.

See Also:
  • Method Details

    • fromIr

      public static SbeSchema fromIr(Ir ir, SbeSchema.IrOptions irOptions)
      Creates a new 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.

      Parameters:
      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.
      Returns:
      a new SbeSchema instance
    • getIr

      public @Nullable Ir getIr()
    • getIrOptions

      public @Nullable SbeSchema.IrOptions getIrOptions()
    • getSbeFields

      public org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList<org.apache.beam.sdk.extensions.sbe.SbeField> getSbeFields()