T
- type of elements@PublicEvolving
public class TextOutputFormat<T>
extends org.apache.flink.api.common.io.FileOutputFormat<T>
FileOutputFormat
that writes objects to a text file.
Objects are converted to Strings using either Object.toString()
or a TextOutputFormat.TextFormatter
.
限定符和类型 | 类和说明 |
---|---|
static interface |
TextOutputFormat.TextFormatter<IN>
Formatter that transforms values into their
String representations. |
构造器和说明 |
---|
TextOutputFormat(org.apache.flink.core.fs.Path outputPath) |
TextOutputFormat(org.apache.flink.core.fs.Path outputPath,
String charset) |
限定符和类型 | 方法和说明 |
---|---|
String |
getCharsetName() |
void |
open(int taskNumber,
int numTasks) |
void |
setCharsetName(String charsetName) |
String |
toString() |
void |
writeRecord(T record) |
public TextOutputFormat(org.apache.flink.core.fs.Path outputPath)
public TextOutputFormat(org.apache.flink.core.fs.Path outputPath, String charset)
public String getCharsetName()
public void setCharsetName(String charsetName) throws IllegalCharsetNameException, UnsupportedCharsetException
public void open(int taskNumber, int numTasks) throws IOException
open
在接口中 org.apache.flink.api.common.io.OutputFormat<T>
open
在类中 org.apache.flink.api.common.io.FileOutputFormat<T>
IOException
public void writeRecord(T record) throws IOException
IOException
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.