[ 
https://issues.apache.org/jira/browse/STORM-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15121625#comment-15121625
 ] 

ASF GitHub Bot commented on STORM-1483:
---------------------------------------

Github user vesense commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1038#discussion_r51131897
  
    --- Diff: 
external/storm-mongodb/src/main/java/org/apache/storm/mongodb/bolt/MongoUpdateBolt.java
 ---
    @@ -0,0 +1,69 @@
    +/**
    + * 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.storm.mongodb.bolt;
    +
    +import org.apache.commons.lang.Validate;
    +import org.apache.storm.mongodb.common.QueryFilterCreator;
    +import org.apache.storm.mongodb.common.mapper.MongoMapper;
    +import org.apache.storm.topology.OutputFieldsDeclarer;
    +import org.apache.storm.tuple.Tuple;
    +import org.bson.Document;
    +import org.bson.conversions.Bson;
    +
    +/**
    + * Basic bolt for updating from MongoDB.
    + *
    + * Note: Each MongoUpdateBolt defined in a topology is tied to a specific 
collection.
    + *
    + */
    +public class MongoUpdateBolt extends AbstractMongoBolt {
    --- End diff --
    
    In MongoDB, `upsert` is an option of `UpdateRequest`:
    >whether this update will insert a new document if no documents match the 
filter.  The default is false.
    I don't think it's a better way to merge insert&update for inserting 
scenario.



> add storm-mongodb connector
> ---------------------------
>
>                 Key: STORM-1483
>                 URL: https://issues.apache.org/jira/browse/STORM-1483
>             Project: Apache Storm
>          Issue Type: Improvement
>            Reporter: Xin Wang
>            Assignee: Xin Wang
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to