MikeThomsen commented on code in PR #11595:
URL: https://github.com/apache/nifi/pull/11595#discussion_r3874770656


##########
nifi-extension-bundles/nifi-cql-bundle/nifi-cql-services-api/src/main/java/org/apache/nifi/service/cql/api/service/CQLExecutionService.java:
##########
@@ -0,0 +1,289 @@
+/*
+ * 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.service.cql.api.service;
+
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.resource.ResourceCardinality;
+import org.apache.nifi.components.resource.ResourceType;
+import org.apache.nifi.controller.ControllerService;
+import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.record.path.RecordPath;
+import org.apache.nifi.service.cql.api.constants.ConnectionCompression;
+import org.apache.nifi.service.cql.api.constants.CqlBatchType;
+import org.apache.nifi.service.cql.api.constants.CqlConsistencyLevel;
+import org.apache.nifi.service.cql.api.constants.UpdateMethod;
+import org.apache.nifi.service.cql.api.exception.QueryFailureException;
+import org.apache.nifi.service.cql.api.lookup.CqlStatementResult;
+import org.apache.nifi.service.cql.api.metadata.PrimaryKey;
+import org.apache.nifi.service.cql.api.metadata.PrimaryKeyIdentifier;
+import org.apache.nifi.service.cql.api.metadata.QualifiedTableName;
+import org.apache.nifi.ssl.SSLContextService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Backend-agnostic connection service for Apache Cassandra/ScyllaDB, so 
{@code PutCQLRecord},
+ * {@code ExecuteCQLQueryRecord} and {@code CQLDistributedMapCache} need not 
know which driver
+ * implementation is configured. The property descriptors are the shared 
connection settings both
+ * implementations expose identically; the methods are the query/write 
contract each must provide.
+ */
+public interface CQLExecutionService extends ControllerService {
+    PropertyDescriptor CONTACT_POINTS = new PropertyDescriptor.Builder()
+            .name("Cassandra Contact Points")
+            .description("Contact points are addresses of Cassandra nodes, as 
a comma-separated list of "
+                    + "hostname:port entries - for example 
node1:9042,node2:9042. An IPv6 address must be "
+                    + "bracketed to carry a port, as [::1]:9042. If an entry 
names no port, the default "
+                    + "client port of 9042 is used.")
+            .required(true)
+            .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
+            .addValidator(ContactPoints.VALIDATOR)
+            .build();
+
+    PropertyDescriptor DATACENTER = new PropertyDescriptor.Builder()
+            .name("Cassandra Datacenter")
+            .description("The datacenter setting to use with your 
node/cluster.")
+            .required(true)
+            .expressionLanguageSupported(ExpressionLanguageScope.ENVIRONMENT)
+            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+            .build();
+
+    PropertyDescriptor KEYSPACE = new PropertyDescriptor.Builder()
+            .name("Default Keyspace")
+            .description("The Cassandra Keyspace to connect to. If no keyspace 
is specified, the query will need to " +
+                    "include the keyspace name before any table reference, in 
case of 'query' native processors or " +
+                    "if the processor supports the 'Table' property, the 
keyspace name has to be provided with the " +
+                    "table name in the form of <KEYSPACE>.<TABLE>")

Review Comment:
   Done.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to