beam-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (BEAM-12400) Improve MongoDBIO for beam - add update capability
Date Tue, 13 Jul 2021 12:14:00 GMT

     [ https://issues.apache.org/jira/browse/BEAM-12400?focusedWorklogId=621963&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621963
]

ASF GitHub Bot logged work on BEAM-12400:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Jul/21 12:13
            Start Date: 13/Jul/21 12:13
    Worklog Time Spent: 10m 
      Work Description: aromanenko-dev commented on a change in pull request #14927:
URL: https://github.com/apache/beam/pull/14927#discussion_r668703561



##########
File path: sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java
##########
@@ -910,15 +973,24 @@ public void startBundle() {
       public void processElement(ProcessContext ctx) {
         // Need to copy the document because mongoCollection.insertMany() will mutate it
         // before inserting (will assign an id).
+
         batch.add(new Document(ctx.element()));
         if (batch.size() >= spec.batchSize()) {
-          flush();
+          if (spec.isUpdate()) {

Review comment:
       @pareshsarafmdb Thanks, let me take a look. 
   @pabloem Do you have any comments on this?




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


Issue Time Tracking
-------------------

            Worklog Id:     (was: 621963)
    Remaining Estimate: 165h 50m  (was: 166h)
            Time Spent: 2h 10m  (was: 2h)

> Improve MongoDBIO for beam - add update capability
> --------------------------------------------------
>
>                 Key: BEAM-12400
>                 URL: https://issues.apache.org/jira/browse/BEAM-12400
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-mongodb
>            Reporter: Paresh Saraf
>            Assignee: Paresh Saraf
>            Priority: P2
>   Original Estimate: 168h
>          Time Spent: 2h 10m
>  Remaining Estimate: 165h 50m
>
> Right now mongodbio supports only inserts/overwrites to a collections. In many cases
it will be usually updating an existing document: setting a field or pushing into an array.
BulkUpdate capability to be added as part part of MongoDBIo->Write



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message