Github user joewitt commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2671#discussion_r191616334
--- Diff:
nifi-nar-bundles/nifi-marklogic-bundle/nifi-marklogic-processors/src/main/java/com/marklogic/nifi/processor/AbstractMarkLogicProcessor.java
---
@@ -0,0 +1,91 @@
+/*
+ * 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 com.marklogic.nifi.processor;
+
+import com.marklogic.client.DatabaseClient;
+import com.marklogic.nifi.controller.MarkLogicDatabaseClientService;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractSessionFactoryProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.util.StandardValidators;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Defines common properties for MarkLogic processors.
+ */
+public abstract class AbstractMarkLogicProcessor extends
AbstractSessionFactoryProcessor {
+
+ protected List<PropertyDescriptor> properties;
+ protected Set<Relationship> relationships;
+
+ public static final PropertyDescriptor DATABASE_CLIENT_SERVICE = new
PropertyDescriptor.Builder()
+ .name("DatabaseClient Service")
+ .displayName("DatabaseClient Service")
+ .required(true)
+ .description("The DatabaseClient Controller Service that provides
the MarkLogic connection")
+ .identifiesControllerService(MarkLogicDatabaseClientService.class)
+ .build();
+
+ public static final PropertyDescriptor BATCH_SIZE = new
PropertyDescriptor.Builder()
+ .name("Batch size")
+ .displayName("Batch size")
+ .required(true)
+ .defaultValue("100")
+ .description("The number of documents per batch - sets the batch
size on the Batcher")
+ .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
+ .build();
+
+ public static final PropertyDescriptor THREAD_COUNT = new
PropertyDescriptor.Builder()
+ .name("Thread count")
+ .displayName("Thread count")
+ .required(false)
+ .description("The number of threads - sets the thread count on the
Batcher")
+ .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR)
--- End diff --
probably makes sense to include a default value here for people to
undersatnd how many threads this will have by default
---