lukecwik commented on a change in pull request #12320:
URL: https://github.com/apache/beam/pull/12320#discussion_r474993006
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2Message.java
##########
@@ -19,21 +19,24 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.api.services.healthcare.v1beta1.model.Message;
+import com.google.api.services.healthcare.v1beta1.model.ParsedData;
import com.google.api.services.healthcare.v1beta1.model.SchematizedData;
import java.io.IOException;
import java.util.Map;
+import java.util.Objects;
import javax.annotation.Nullable;
/** The type HL7v2 message to wrap the {@link Message} model. */
public class HL7v2Message {
Review comment:
Why not use `@AutoValue` and `@AutoValue.Builder` to generate this data
object and builder for you?
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2MessageCoder.java
##########
@@ -42,17 +43,19 @@ public static HL7v2MessageCoder of(Class<HL7v2Message>
clazz) {
private static final NullableCoder<String> STRING_CODER =
NullableCoder.of(StringUtf8Coder.of());
private static final NullableCoder<Map<String, String>> MAP_CODER =
NullableCoder.of(MapCoder.of(STRING_CODER, STRING_CODER));
+ private static final NullableCoder<ParsedData> PARSED_DATA_CODER =
+ NullableCoder.of(ParsedDataCoder.of());
@Override
- public void encode(HL7v2Message value, OutputStream outStream)
- throws CoderException, IOException {
+ public void encode(HL7v2Message value, OutputStream outStream) throws
IOException {
Review comment:
Changing the encoding breaks pipeline update on Dataflow for streaming
pipelines.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]