You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2023/01/18 14:52:25 UTC

[GitHub] [beam] kamrankoupayi opened a new pull request, #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

kamrankoupayi opened a new pull request, #25056:
URL: https://github.com/apache/beam/pull/25056

   Adding HL7v2ReadParameter and HL7v2ReadResponse which allow to sent metadata while reading from HL7v2Store, and a function to read from PCollection of HL7v2ReadParameter and return a result which contains PCollection messages of HLReadResponse and PCollection failed results of HealthCareIOError<HL7v2Parameter>.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/get-started-contributing/#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/workflows/Go%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
   


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kamrankoupayi commented on a diff in pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by "kamrankoupayi (via GitHub)" <gi...@apache.org>.
kamrankoupayi commented on code in PR #25056:
URL: https://github.com/apache/beam/pull/25056#discussion_r1100951987


##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2IOTest.java:
##########
@@ -59,6 +61,30 @@ public void test_HL7v2IO_failedReads() {
     pipeline.run();
   }
 
+  @Test
+  public void test_HL7v2IO_failedReadsByParameter() {

Review Comment:
   So, I've change the names of the tests to be smallCamelNamingStyle in here.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kamrankoupayi commented on pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by "kamrankoupayi (via GitHub)" <gi...@apache.org>.
kamrankoupayi commented on PR #25056:
URL: https://github.com/apache/beam/pull/25056#issuecomment-1423610423

   > Thanks, looks pretty good. Got a couple of minor comment.
   > 
   > Also, the added integration test has a warning:
   > 
   > https://ci-beam.apache.org/job/beam_PreCommit_Java_GCP_IO_Direct_Commit/1564/testReport/org.apache.beam.sdk.io.gcp.healthcare/HL7v2IOReadWriteIT/testHL7v2IOGetAllE2E/
   > 
   > ```
   > WARNING: Can't verify serialized elements of type HL7v2ReadParameter have well defined equals method. This may produce incorrect results on some PipelineRunner implementations
   > ```
   > 
   > Is this something need attention?
   
   Thank you for review and your comments.
   And yes that's important so I added the equal function for HL7v2ReadParameter class to address this warning. Thanks for catching.


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] github-actions[bot] commented on pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #25056:
URL: https://github.com/apache/beam/pull/25056#issuecomment-1387233163

   Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
   
   R: @kennknowles for label java.
   R: @ahmedabu98 for label io.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
   
   The PR bot will only process comments in the main thread (not review comments).


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Abacn merged pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #25056:
URL: https://github.com/apache/beam/pull/25056


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] github-actions[bot] commented on pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #25056:
URL: https://github.com/apache/beam/pull/25056#issuecomment-1387270842

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kamrankoupayi commented on pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by GitBox <gi...@apache.org>.
kamrankoupayi commented on PR #25056:
URL: https://github.com/apache/beam/pull/25056#issuecomment-1387268561

   R: @pabloem


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kamrankoupayi commented on pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by "kamrankoupayi (via GitHub)" <gi...@apache.org>.
kamrankoupayi commented on PR #25056:
URL: https://github.com/apache/beam/pull/25056#issuecomment-1409281467

   R: @ahmedabu98


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] Abacn commented on a diff in pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #25056:
URL: https://github.com/apache/beam/pull/25056#discussion_r1100880375


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2IO.java:
##########
@@ -260,15 +266,12 @@ public static class Read extends PTransform<PCollection<String>, Read.Result> {
 
     public Read() {}
 
-    public static class Result implements POutput, PInput {
-
-      private PCollection<HL7v2Message> messages;
-
-      private PCollection<HealthcareIOError<String>> failedReads;
-      PCollectionTuple pct;
+    public static class Result extends HL7v2ReadResult<String, HL7v2Message> {

Review Comment:
   ideally each public class (that would be rendered to javadoc) should have docstring. Would you mind add a brief docstring also here?



##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2IOTest.java:
##########
@@ -59,6 +61,30 @@ public void test_HL7v2IO_failedReads() {
     pipeline.run();
   }
 
+  @Test
+  public void test_HL7v2IO_failedReadsByParameter() {

Review Comment:
   ```suggestion
     public void testHL7v2IOFailedReadsByParameter() {
   ```
   
   We use smallCamelNamingStyle in Java
   
   This leads to me to wonder if our checkStyle for test code no longer working.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kamrankoupayi commented on a diff in pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by "kamrankoupayi (via GitHub)" <gi...@apache.org>.
kamrankoupayi commented on code in PR #25056:
URL: https://github.com/apache/beam/pull/25056#discussion_r1100952509


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2IO.java:
##########
@@ -260,15 +266,12 @@ public static class Read extends PTransform<PCollection<String>, Read.Result> {
 
     public Read() {}
 
-    public static class Result implements POutput, PInput {
-
-      private PCollection<HL7v2Message> messages;
-
-      private PCollection<HealthcareIOError<String>> failedReads;
-      PCollectionTuple pct;
+    public static class Result extends HL7v2ReadResult<String, HL7v2Message> {

Review Comment:
   Thanks for mentioning, added  brief docstring.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] ahmedabu98 commented on a diff in pull request #25056: Beam/sdks/io/gcp/java/healcare/hl7v2 io read

Posted by "ahmedabu98 (via GitHub)" <gi...@apache.org>.
ahmedabu98 commented on code in PR #25056:
URL: https://github.com/apache/beam/pull/25056#discussion_r1100722820


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2ReadParameter.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.healthcare;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import java.util.Objects;
+import javax.annotation.Nullable;
+import org.apache.beam.sdk.schemas.AutoValueSchema;
+import org.apache.beam.sdk.schemas.annotations.DefaultSchema;
+import org.apache.beam.sdk.schemas.annotations.SchemaCreate;
+
+/**
+ * HL7v2ReadParameter represents the read parameters for a HL7v2 read request, used as a parameter
+ * for {@link HL7v2IO.Read}.

Review Comment:
   ```suggestion
    * HL7v2ReadParameter represents the read parameters for a HL7v2 read request, used as the input
    * type for {@link HL7v2IO.HL7v2Read}.
   ```



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2ReadResponse.java:
##########
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.healthcare;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.util.Objects;
+import javax.annotation.Nullable;
+
+/**
+ * HL7v2ReadResponse represents the response format for a HL7v2 read request, used as a parameter
+ * for {@link HL7v2IO.Read}.

Review Comment:
   ```suggestion
    * HL7v2ReadResponse represents the response format for a HL7v2 read request, used as the output
    * type of {@link HL7v2IO.HL7v2Read}.
   ```



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org