You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2019/10/11 20:23:18 UTC
[beam] branch master updated: BEAM-7739: Rename ValueStateSpec to
ReadModifyWrite
This is an automated email from the ASF dual-hosted git repository.
pabloem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 04c3731 BEAM-7739: Rename ValueStateSpec to ReadModifyWrite
new 2e548c5 Merge pull request #9687 from rakeshcusat/BEAM-7739-modify-idl-definition
04c3731 is described below
commit 04c373188cef0fa9b873861e5170dfa5725864fb
Author: Rakesh Kumar <ra...@lyft.com>
AuthorDate: Sun Sep 29 22:41:44 2019 -0700
BEAM-7739: Rename ValueStateSpec to ReadModifyWrite
---
model/pipeline/src/main/proto/beam_runner_api.proto | 4 ++--
.../apache/beam/runners/core/construction/ParDoTranslation.java | 9 +++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/model/pipeline/src/main/proto/beam_runner_api.proto b/model/pipeline/src/main/proto/beam_runner_api.proto
index 736bcdc..f3fee49 100644
--- a/model/pipeline/src/main/proto/beam_runner_api.proto
+++ b/model/pipeline/src/main/proto/beam_runner_api.proto
@@ -411,7 +411,7 @@ message Parameter {
message StateSpec {
oneof spec {
- ValueStateSpec value_spec = 1;
+ ReadModifyWriteStateSpec read_modify_write_spec = 1;
BagStateSpec bag_spec = 2;
CombiningStateSpec combining_spec = 3;
MapStateSpec map_spec = 4;
@@ -419,7 +419,7 @@ message StateSpec {
}
}
-message ValueStateSpec {
+message ReadModifyWriteStateSpec {
string coder_id = 1;
}
diff --git a/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/ParDoTranslation.java b/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/ParDoTranslation.java
index 600538d..280e2f3 100644
--- a/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/ParDoTranslation.java
+++ b/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/ParDoTranslation.java
@@ -451,8 +451,8 @@ public class ParDoTranslation {
@Override
public RunnerApi.StateSpec dispatchValue(Coder<?> valueCoder) {
return builder
- .setValueSpec(
- RunnerApi.ValueStateSpec.newBuilder()
+ .setReadModifyWriteSpec(
+ RunnerApi.ReadModifyWriteStateSpec.newBuilder()
.setCoderId(registerCoderOrThrow(components, valueCoder)))
.build();
}
@@ -502,8 +502,9 @@ public class ParDoTranslation {
static StateSpec<?> fromProto(RunnerApi.StateSpec stateSpec, RehydratedComponents components)
throws IOException {
switch (stateSpec.getSpecCase()) {
- case VALUE_SPEC:
- return StateSpecs.value(components.getCoder(stateSpec.getValueSpec().getCoderId()));
+ case READ_MODIFY_WRITE_SPEC:
+ return StateSpecs.value(
+ components.getCoder(stateSpec.getReadModifyWriteSpec().getCoderId()));
case BAG_SPEC:
return StateSpecs.bag(components.getCoder(stateSpec.getBagSpec().getElementCoderId()));
case COMBINING_SPEC: