@@ -586,11 +586,17 @@ message StateSpec {
586586 FunctionSpec protocol = 7 ;
587587}
588588
589+ // Specification for a read-modify-write state cell, which holds a single value
590+ // per key and window. The value can be read, modified, and written back atomically.
589591message ReadModifyWriteStateSpec {
592+ // (Required) The id of the Coder for the values stored in this state cell.
590593 string coder_id = 1 ;
591594}
592595
596+ // Specification for a bag state cell, which holds an unordered collection of elements
597+ // per key and window. Elements can be appended and read as an iterable.
593598message BagStateSpec {
599+ // (Required) The id of the Coder for elements stored in this bag.
594600 string element_coder_id = 1 ;
595601}
596602
@@ -601,30 +607,57 @@ message OrderedListStateSpec {
601607 string element_coder_id = 1 ;
602608}
603609
610+ // Specification for a combining state cell, which incrementally combines values
611+ // using a CombineFn. Rather than storing all input values, it stores a single
612+ // accumulator that is updated as new values arrive.
604613message CombiningStateSpec {
614+ // (Required) The id of the Coder for the accumulator.
605615 string accumulator_coder_id = 1 ;
616+ // (Required) The FunctionSpec of the CombineFn used to combine values.
606617 FunctionSpec combine_fn = 2 ;
607618}
608619
620+ // Specification for a map state cell, which holds a key-value mapping per key
621+ // and window. Keys and values can be read, written, and deleted individually.
622+ // Note: This is distinct from MultimapStateSpec in that MapState keys are unique.
623+ // In practice, Beam SDKs use Multimap state for both map and multimap semantics.
609624message MapStateSpec {
625+ // (Required) The id of the Coder for map keys.
610626 string key_coder_id = 1 ;
627+ // (Required) The id of the Coder for map values.
611628 string value_coder_id = 2 ;
612629}
613630
631+ // Specification for a multimap state cell, which holds a key-to-multiple-values
632+ // mapping per key and window. A single key can be associated with multiple values,
633+ // analogous to a multimap.
614634message MultimapStateSpec {
635+ // (Required) The id of the Coder for map keys.
615636 string key_coder_id = 1 ;
637+ // (Required) The id of the Coder for map values.
616638 string value_coder_id = 2 ;
617639}
618640
641+ // Specification for a set state cell, which holds an unordered collection of
642+ // unique elements per key and window. Elements can be added, removed, and checked
643+ // for existence.
619644message SetStateSpec {
645+ // (Required) The id of the Coder for elements stored in this set.
620646 string element_coder_id = 1 ;
621647}
622648
649+ // Specification for a timer family, which groups timers that share the same
650+ // time domain and encoding. Timer families allow timers to be managed together,
651+ // including batch processing of expired timers.
623652message TimerFamilySpec {
653+ // (Required) The time domain for this timer family (event time or processing time).
624654 TimeDomain.Enum time_domain = 1 ;
655+ // (Required) The id of the Coder for timers in this family.
625656 string timer_family_coder_id = 2 ;
626657}
627658
659+ // Indicates whether a PCollection is bounded (finite, known size) or unbounded (infinite, unknown size).
660+ // This affects how runners execute the pipeline and which features are available.
628661message IsBounded {
629662 enum Enum {
630663 UNSPECIFIED = 0 ;
@@ -811,7 +844,13 @@ message GroupIntoBatchesPayload {
811844 int64 max_buffering_duration_millis = 2 ;
812845}
813846
847+ // Payload for the RedistributeByKey and RedistributeArbitrarily composite transforms.
848+ // These transforms redistribute elements across workers, optionally allowing duplicates
849+ // to improve throughput at the cost of additional processing.
814850message RedistributePayload {
851+ // (Optional) If true, the redistribution may produce duplicate elements.
852+ // This can improve performance by avoiding costly deduplication, but requires
853+ // downstream transforms to be tolerant of duplicates.
815854 bool allow_duplicates = 1 ;
816855}
817856
@@ -1330,8 +1369,9 @@ message Trigger {
13301369 message Default {
13311370 }
13321371
1333- // Ready whenever the requisite number of input elements have arrived
1372+ // Ready whenever the requisite number of input elements have arrived.
13341373 message ElementCount {
1374+ // (Required) The number of elements that must arrive before this trigger fires.
13351375 int32 element_count = 1 ;
13361376 }
13371377
@@ -1477,11 +1517,12 @@ message StandardArtifacts {
14771517 }
14781518}
14791519
1520+ // Payload for a file-based artifact, referencing a locally-accessible file on disk.
14801521message ArtifactFilePayload {
1481- // a string for an artifact file path e.g. "/tmp/foo.jar"
1522+ // (Required) A file path for an artifact e.g. "/tmp/foo.jar"
14821523 string path = 1 ;
14831524
1484- // The hex-encoded sha256 checksum of the artifact.
1525+ // (Optional) The hex-encoded sha256 checksum of the artifact.
14851526 string sha256 = 2 ;
14861527}
14871528
@@ -1498,11 +1539,12 @@ message EmbeddedFilePayload {
14981539 bytes data = 1 ;
14991540}
15001541
1542+ // Payload for a PyPI artifact, describing a Python package dependency.
15011543message PyPIPayload {
1502- // Pypi compatible artifact id e.g. "apache-beam"
1544+ // (Required) A PyPI- compatible artifact id e.g. "apache-beam"
15031545 string artifact_id = 1 ;
15041546
1505- // Pypi compatible version string.
1547+ // (Required) A PyPI- compatible version string, e.g. "2.59.0"
15061548 string version = 2 ;
15071549}
15081550
@@ -1515,29 +1557,40 @@ message MavenPayload {
15151557 string repository_url = 2 ;
15161558}
15171559
1560+ // Payload for a deferred artifact, where the interpretation of the data is
1561+ // deferred to the creator. This allows custom artifact types not covered by
1562+ // the standard artifact types.
15181563message DeferredArtifactPayload {
1519- // A unique string identifier assigned by the creator of this payload. The creator may use this key to confirm
1564+ // (Required) A unique string identifier assigned by the creator of this payload. The creator may use this key to confirm
15201565 // whether they can parse the data.
15211566 string key = 1 ;
15221567
1523- // Data for deferred artifacts. Interpretation of bytes is delegated to the creator of this payload.
1568+ // (Required) Data for deferred artifacts. Interpretation of bytes is delegated to the creator of this payload.
15241569 bytes data = 2 ;
15251570}
15261571
1572+ // Payload for the staging_to role, used when an artifact needs to be staged
1573+ // to a particular location. The staged name is relative to the staging directory.
15271574message ArtifactStagingToRolePayload {
1528- // A generated staged name (relative path under staging directory).
1575+ // (Required) A generated staged name (relative path under staging directory).
15291576 string staged_name = 1 ;
15301577}
15311578
1579+ // Full descriptor of an artifact, including its type and role.
1580+ // Used to describe dependencies of an Environment.
15321581message ArtifactInformation {
1533- // A URN that describes the type of artifact
1582+ // (Required) A URN that describes the type of artifact (e.g. file, URL, embedded, PyPI, Maven).
1583+ // See StandardArtifacts.Types for well-known URNs.
15341584 string type_urn = 1 ;
15351585
1586+ // (Optional) The payload for the artifact type, as determined by type_urn.
15361587 bytes type_payload = 2 ;
15371588
1538- // A URN that describes the role of artifact
1589+ // (Required) A URN that describes the role of the artifact (e.g. staging_to, go_worker_binary).
1590+ // See StandardArtifacts.Roles for well-known URNs.
15391591 string role_urn = 3 ;
15401592
1593+ // (Optional) The payload for the artifact role, as determined by role_urn.
15411594 bytes role_payload = 4 ;
15421595}
15431596
@@ -1598,24 +1651,41 @@ message StandardEnvironments {
15981651 }
15991652}
16001653
1601- // The payload of a Docker image
1654+ // Payload for a Docker container environment.
16021655message DockerPayload {
1656+ // (Required) The Docker container image URL, e.g. "apache/beam_java_sdk:2.59.0"
16031657 string container_image = 1 ; // implicitly linux_amd64.
16041658}
16051659
1660+ // Payload for a native process environment, where the SDK harness is launched as
1661+ // a subprocess directly on the worker machine (not inside a container).
16061662message ProcessPayload {
1663+ // (Required) The operating system, e.g. "linux", "darwin".
16071664 string os = 1 ; // "linux", "darwin", ..
1665+ // (Required) The CPU architecture, e.g. "amd64", "arm64".
16081666 string arch = 2 ; // "amd64", ..
1667+ // (Required) The command to execute to start the SDK harness process.
16091668 string command = 3 ; // process to execute
1669+ // (Optional) Environment variables to set for the SDK harness process.
16101670 map <string , string > env = 4 ; // Environment variables
16111671}
16121672
1673+ // Payload for an external process environment, where the SDK harness is managed
1674+ // by an external service rather than directly by the runner. The runner communicates
1675+ // with the external worker pool via the provided gRPC endpoint.
16131676message ExternalPayload {
1677+ // (Required) The gRPC endpoint serving the BeamFnExternalWorkerPool API.
16141678 ApiServiceDescriptor endpoint = 1 ; // Serving BeamFnExternalWorkerPool API.
1679+ // (Optional) Arbitrary extra parameters to pass to the external worker pool.
16151680 map <string , string > params = 2 ; // Arbitrary extra parameters to pass
16161681}
16171682
1683+ // Payload for an AnyOf environment, which presents a set of equivalent environments
1684+ // that a runner may choose from. Each alternative is fully specified with its own
1685+ // dependencies, capabilities, etc. This allows SDKs to express flexibility in
1686+ // execution environment while preserving compatibility across runners.
16181687message AnyOfEnvironmentPayload {
1688+ // (Required) The list of fully-specified environments the runner may choose from.
16191689 // Each is fully contained (with their own dependencies, capabilities, etc.)
16201690 repeated Environment environments = 1 ;
16211691}
@@ -1852,6 +1922,8 @@ message StandardDisplayData {
18521922 }
18531923}
18541924
1925+ // A labelled display data payload, associating a human-readable label with a value.
1926+ // Used as the payload for the StandardDisplayData.LABELLED URN.
18551927message LabelledPayload {
18561928 // (Required) A human readable label for the value.
18571929 string label = 1 ;
0 commit comments