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

    https://github.com/apache/nifi/pull/3011#discussion_r234457340
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongoRecord.java
 ---
    @@ -0,0 +1,213 @@
    +/*
    + * 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.nifi.processors.mongodb;
    +
    +import com.mongodb.client.FindIterable;
    +import com.mongodb.client.MongoCollection;
    +import com.mongodb.client.MongoCursor;
    +import org.apache.nifi.annotation.behavior.InputRequirement;
    +import org.apache.nifi.annotation.behavior.WritesAttribute;
    +import org.apache.nifi.annotation.behavior.WritesAttributes;
    +import org.apache.nifi.annotation.documentation.CapabilityDescription;
    +import org.apache.nifi.annotation.documentation.Tags;
    +import org.apache.nifi.annotation.lifecycle.OnScheduled;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.expression.ExpressionLanguageScope;
    +import org.apache.nifi.flowfile.FlowFile;
    +import org.apache.nifi.mongodb.MongoDBClientService;
    +import org.apache.nifi.processor.ProcessContext;
    +import org.apache.nifi.processor.ProcessSession;
    +import org.apache.nifi.processor.Relationship;
    +import org.apache.nifi.processor.exception.ProcessException;
    +import org.apache.nifi.processor.util.StandardValidators;
    +import org.apache.nifi.schema.access.SchemaNotFoundException;
    +import org.apache.nifi.serialization.RecordSetWriter;
    +import org.apache.nifi.serialization.RecordSetWriterFactory;
    +import org.apache.nifi.serialization.record.MapRecord;
    +import org.apache.nifi.serialization.record.Record;
    +import org.apache.nifi.serialization.record.RecordSchema;
    +import org.bson.Document;
    +import org.bson.types.ObjectId;
    +
    +import java.io.OutputStream;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.HashMap;
    +import java.util.HashSet;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Set;
    +
    +@CapabilityDescription("A record-based version of GetMongo that uses the 
Record writers to write the MongoDB result set.")
    +@Tags({"mongo", "mongodb", "get", "fetch", "record", "json"})
    +@InputRequirement(InputRequirement.Requirement.INPUT_ALLOWED)
    +@WritesAttributes({
    +    @WritesAttribute(attribute = GetMongo.DB_NAME, description = "The 
database where the results came from."),
    +    @WritesAttribute(attribute = GetMongo.COL_NAME, description = "The 
collection where the results came from.")
    +})
    +public class GetMongoRecord extends AbstractMongoQueryProcessor {
    +    public static final PropertyDescriptor CLIENT = new 
PropertyDescriptor.Builder()
    --- End diff --
    
    Fixed. Couldn't test locally because I'm having connectivity issues for one 
of the maven dependencies in nifi-hdfs-processors.


---

Reply via email to