JingsongLi commented on a change in pull request #12134:
URL: https://github.com/apache/flink/pull/12134#discussion_r425531470



##########
File path: 
flink-core/src/main/java/org/apache/flink/api/common/serialization/PathBasedBulkWriter.java
##########
@@ -0,0 +1,69 @@
+/*
+ * 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.api.common.serialization;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.core.fs.Path;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * Specialized {@link BulkWriter} which is expected to write to specified
+ * {@link Path} instead of output stream.
+ */
+@Internal
+public interface PathBasedBulkWriter<T> extends BulkWriter<T> {
+
+       /**
+        * Gets the size written by the current writer.
+        *
+        * @return The size written by the current writer.
+        */
+       long getSize() throws IOException;
+
+       /**
+        * Disposes the writer on failures. Unlike output-stream-based writers 
which
+        * could handled uniformly by closing the underlying output stream, the 
path-
+        * based writers need to be disposed explicitly.
+        */
+       void dispose();
+
+       // 
------------------------------------------------------------------------
+
+       /**
+        * A factory that creates a {@link PathBasedBulkWriter}.
+        *
+        * @param <T> The type of record to write.
+        */
+       @FunctionalInterface
+       public interface Factory<T> extends Serializable {

Review comment:
       interface nested in interface, default is public.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to