granthenke commented on a change in pull request #3387: NIFI-6009 ScanKudu Processor & KuduPut Processor Delete Operation URL: https://github.com/apache/nifi/pull/3387#discussion_r273560052
########## File path: nifi-nar-bundles/nifi-kudu-bundle/nifi-kudu-client-service-api/src/main/java/org/apache/nifi/kudu/KuduClientService.java ########## @@ -0,0 +1,88 @@ +/* + * 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.kudu; + +import org.apache.kudu.Schema; +import org.apache.kudu.client.AsyncKuduClient; +import org.apache.kudu.client.KuduClient; +import org.apache.kudu.client.KuduTable; +import org.apache.kudu.client.KuduSession; +import org.apache.kudu.client.PartialRow; +import org.apache.kudu.client.RowError; +import org.apache.nifi.controller.ControllerService; +import org.apache.nifi.kudu.scan.ResultHandler; +import org.apache.nifi.processor.ProcessContext; +import org.apache.nifi.processor.ProcessSession; +import org.apache.nifi.security.krb.KerberosUser; +import org.apache.nifi.serialization.record.Record; + +import java.io.IOException; +import java.util.List; + + +public interface KuduClientService extends ControllerService { + + /** + * + * @param kuduSession the name of an Kudu table + * @param close the record to insert + * @param rowErrors the fieldNames of the row to insert + * @throws IOException thrown when there are communication errors with Kudu + */ + void flushKuduSession(KuduSession kuduSession, boolean close, List<RowError> rowErrors) throws IOException; + + /** + * get created Kudu client connection + */ + KuduClient getKuduClient(); + + /** + * get created Async Kudu client connection + */ + AsyncKuduClient getAsyncKuduClient(); Review comment: Do you need to expose the AsyncKuduClient at all? It's not super commonly used and the interface is marked as unstable. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
