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

    https://github.com/apache/nifi/pull/1942#discussion_r125534346
  
    --- Diff: 
nifi-nar-bundles/nifi-rethinkdb-bundle/nifi-rethinkdb-processors/src/main/java/org/apache/nifi/processors/rethinkdb/AbstractRethinkDbProcessor.java
 ---
    @@ -0,0 +1,170 @@
    +/*
    + * 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.rethinkdb;
    +
    +import org.apache.nifi.annotation.lifecycle.OnScheduled;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.processor.AbstractProcessor;
    +import org.apache.nifi.processor.DataUnit;
    +import org.apache.nifi.processor.ProcessContext;
    +import org.apache.nifi.processor.Relationship;
    +import org.apache.nifi.processor.util.StandardValidators;
    +import com.rethinkdb.RethinkDB;
    +import com.rethinkdb.gen.ast.Table;
    +import com.rethinkdb.net.Connection;
    +
    +/**
    + * Abstract base class for RethinkDb processors
    + */
    +abstract class AbstractRethinkDbProcessor extends AbstractProcessor {
    +
    +    protected static final PropertyDescriptor CHARSET = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-charset")
    +            .displayName("Character Set")
    +            .description("Specifies the character set of the document 
data.")
    +            .required(true)
    +            .defaultValue("UTF-8")
    +            .expressionLanguageSupported(true)
    +            .addValidator(StandardValidators.CHARACTER_SET_VALIDATOR)
    +            .build();
    +
    +    public static final PropertyDescriptor DB_NAME = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-dbname")
    +            .displayName("DB Name")
    +            .description("RethinkDb database to connect to")
    +            .required(true)
    +            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    +            .build();
    +
    +    public static final PropertyDescriptor DB_HOST = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-host")
    +            .displayName("Hostname")
    +            .description("RethinkDb hostname")
    +            .required(true)
    +            .defaultValue("localhost")
    +            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    +            .build();
    +
    +    public static final PropertyDescriptor DB_PORT = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-port")
    +            .displayName("DB Port")
    +            .description("RethinkDb database port to connect to")
    +            .required(true)
    +            .defaultValue("28015")
    +            .addValidator(StandardValidators.PORT_VALIDATOR)
    +            .build();
    +
    +    public static final PropertyDescriptor USERNAME = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-username")
    +            .displayName("Username")
    +            .description("Username for accessing RethinkDb")
    +            .required(false)
    +            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    +            .build();
    +
    +    public static final PropertyDescriptor PASSWORD = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-password")
    +            .displayName("Password")
    +            .description("Password for user")
    +            .required(false)
    +            .sensitive(true)
    +            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    +            .build();
    +
    +    public static final PropertyDescriptor TABLE_NAME = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-table")
    +            .displayName("Table name")
    +            .description("RethinkDb table to connect to")
    +            .required(true)
    +            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    +            .build();
    +
    +    protected static final PropertyDescriptor MAX_DOCUMENTS_SIZE = new 
PropertyDescriptor.Builder()
    +            .name("rethinkdb-max-document-size")
    +            .displayName("Max size of documents in MBs")
    +            .description("Maximum size of documents allowed to be posted 
in one batch")
    +            .defaultValue("1 MB")
    +            .required(true)
    +            .addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
    +            .build();
    +
    +    static final Relationship REL_SUCCESS = new 
Relationship.Builder().name("success")
    +            .description("Sucessful FlowFiles are routed to this 
relationship").build();
    +
    +    static final Relationship REL_FAILURE = new 
Relationship.Builder().name("success")
    --- End diff --
    
    Should this be named `failure`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to