org.apache.flink.api.java.io.TextOutputFormat.TextFormatter Java Examples

The following examples show how to use org.apache.flink.api.java.io.TextOutputFormat.TextFormatter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FormattingMapper.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
public FormattingMapper(TextOutputFormat.TextFormatter<T> formatter) {
	this.formatter = formatter;
}
 
Example #2
Source File: FormattingMapper.java    From flink with Apache License 2.0 4 votes vote down vote up
public FormattingMapper(TextOutputFormat.TextFormatter<T> formatter) {
	this.formatter = formatter;
}
 
Example #3
Source File: FormattingMapper.java    From flink with Apache License 2.0 4 votes vote down vote up
public FormattingMapper(TextOutputFormat.TextFormatter<T> formatter) {
	this.formatter = formatter;
}
 
Example #4
Source File: DataSet.java    From Flink-CEPplus with Apache License 2.0 2 votes vote down vote up
/**
 * Writes a DataSet as text file(s) to the specified location.
 *
 * <p>For each element of the DataSet the result of {@link TextFormatter#format(Object)} is written.
 *
 * @param filePath The path pointing to the location the text file is written to.
 * @param formatter formatter that is applied on every element of the DataSet.
 * @return The DataSink that writes the DataSet.
 *
 * @see TextOutputFormat
 * @see DataSet#writeAsText(String) Output files and directories
 */
public DataSink<String> writeAsFormattedText(String filePath, TextFormatter<T> formatter) {
	return map(new FormattingMapper<>(clean(formatter))).writeAsText(filePath);
}
 
Example #5
Source File: DataSet.java    From Flink-CEPplus with Apache License 2.0 2 votes vote down vote up
/**
 * Writes a DataSet as text file(s) to the specified location.
 *
 * <p>For each element of the DataSet the result of {@link TextFormatter#format(Object)} is written.
 *
 * @param filePath The path pointing to the location the text file is written to.
 * @param writeMode Control the behavior for existing files. Options are NO_OVERWRITE and OVERWRITE.
 * @param formatter formatter that is applied on every element of the DataSet.
 * @return The DataSink that writes the DataSet.
 *
 * @see TextOutputFormat
 * @see DataSet#writeAsText(String) Output files and directories
 */
public DataSink<String> writeAsFormattedText(String filePath, WriteMode writeMode, TextFormatter<T> formatter) {
	return map(new FormattingMapper<>(clean(formatter))).writeAsText(filePath, writeMode);
}
 
Example #6
Source File: DataSet.java    From flink with Apache License 2.0 2 votes vote down vote up
/**
 * Writes a DataSet as text file(s) to the specified location.
 *
 * <p>For each element of the DataSet the result of {@link TextFormatter#format(Object)} is written.
 *
 * @param filePath The path pointing to the location the text file is written to.
 * @param formatter formatter that is applied on every element of the DataSet.
 * @return The DataSink that writes the DataSet.
 *
 * @see TextOutputFormat
 * @see DataSet#writeAsText(String) Output files and directories
 */
public DataSink<String> writeAsFormattedText(String filePath, TextFormatter<T> formatter) {
	return map(new FormattingMapper<>(clean(formatter))).writeAsText(filePath);
}
 
Example #7
Source File: DataSet.java    From flink with Apache License 2.0 2 votes vote down vote up
/**
 * Writes a DataSet as text file(s) to the specified location.
 *
 * <p>For each element of the DataSet the result of {@link TextFormatter#format(Object)} is written.
 *
 * @param filePath The path pointing to the location the text file is written to.
 * @param writeMode Control the behavior for existing files. Options are NO_OVERWRITE and OVERWRITE.
 * @param formatter formatter that is applied on every element of the DataSet.
 * @return The DataSink that writes the DataSet.
 *
 * @see TextOutputFormat
 * @see DataSet#writeAsText(String) Output files and directories
 */
public DataSink<String> writeAsFormattedText(String filePath, WriteMode writeMode, TextFormatter<T> formatter) {
	return map(new FormattingMapper<>(clean(formatter))).writeAsText(filePath, writeMode);
}
 
Example #8
Source File: DataSet.java    From flink with Apache License 2.0 2 votes vote down vote up
/**
 * Writes a DataSet as text file(s) to the specified location.
 *
 * <p>For each element of the DataSet the result of {@link TextFormatter#format(Object)} is written.
 *
 * @param filePath The path pointing to the location the text file is written to.
 * @param formatter formatter that is applied on every element of the DataSet.
 * @return The DataSink that writes the DataSet.
 *
 * @see TextOutputFormat
 * @see DataSet#writeAsText(String) Output files and directories
 */
public DataSink<String> writeAsFormattedText(String filePath, TextFormatter<T> formatter) {
	return map(new FormattingMapper<>(clean(formatter))).writeAsText(filePath);
}
 
Example #9
Source File: DataSet.java    From flink with Apache License 2.0 2 votes vote down vote up
/**
 * Writes a DataSet as text file(s) to the specified location.
 *
 * <p>For each element of the DataSet the result of {@link TextFormatter#format(Object)} is written.
 *
 * @param filePath The path pointing to the location the text file is written to.
 * @param writeMode Control the behavior for existing files. Options are NO_OVERWRITE and OVERWRITE.
 * @param formatter formatter that is applied on every element of the DataSet.
 * @return The DataSink that writes the DataSet.
 *
 * @see TextOutputFormat
 * @see DataSet#writeAsText(String) Output files and directories
 */
public DataSink<String> writeAsFormattedText(String filePath, WriteMode writeMode, TextFormatter<T> formatter) {
	return map(new FormattingMapper<>(clean(formatter))).writeAsText(filePath, writeMode);
}