reta commented on code in PR #53:
URL: 
https://github.com/apache/flink-connector-elasticsearch/pull/53#discussion_r1211676310


##########
flink-connector-elasticsearch8/src/main/java/org/apache/flink/connector/elasticsearch/sink/Elasticsearch8Sink.java:
##########
@@ -0,0 +1,119 @@
+/*
+ *
+ * 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.flink.connector.elasticsearch.sink;
+
+import org.apache.flink.connector.base.sink.AsyncSinkBase;
+import org.apache.flink.connector.base.sink.writer.BufferedRequestState;
+import org.apache.flink.connector.base.sink.writer.ElementConverter;
+import org.apache.flink.core.io.SimpleVersionedSerializer;
+import org.apache.http.HttpHost;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collection;
+import java.util.Collections;
+
+public class Elasticsearch8Sink<InputT> extends AsyncSinkBase<InputT, 
Operation> {
+    private static final Logger LOG = 
LoggerFactory.getLogger(Elasticsearch8Sink.class);
+
+    private final String username;
+
+    private final String password;
+
+    private final HttpHost[] httpHosts;
+
+    protected Elasticsearch8Sink(
+        ElementConverter<InputT, Operation> converter,
+        int maxBatchSize,
+        int maxInFlightRequests,
+        int maxBufferedRequests,
+        long maxBatchSizeInBytes,
+        long maxTimeInBufferMS,
+        long maxRecordSizeInByte,
+        String username,
+        String password,
+        HttpHost[] httpHosts
+    ) {
+        super(
+            converter,
+            maxBatchSize,
+            maxInFlightRequests,
+            maxBufferedRequests,
+            maxBatchSizeInBytes,
+            maxTimeInBufferMS,
+            maxRecordSizeInByte
+        );
+
+        this.username = username;
+        this.password = password;
+        this.httpHosts = httpHosts;
+    }
+
+    @Override
+    public StatefulSinkWriter<InputT, BufferedRequestState<Operation>> 
createWriter(
+            InitContext context
+    ) {
+        LOG.debug("creating writer");

Review Comment:
   Personally, I don't think you need this debug logging here and in 
`restoreWriter`, it does not bring any useful information (just my opinion)



-- 
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