@ SuppressWarnings ( "unchecked" ) @ PublicEvolving public < X extends Tuple > DataStreamSink < T > writeAsCsv ( String path , WriteMode writeMode , String rowDelimiter , String fieldDelimiter ) { Preconditions . checkArgument ( getType ( ) . isTupleType ( ) , "The writeAsCsv() method can only be used on data streams of tuples." ) ; CsvOutputFormat < X > of = new CsvOutputFormat <> ( new Path ( path ) , rowDelimiter , fieldDelimiter ) ; if ( writeMode != null ) { of . setWriteMode ( writeMode ) ; } return writeUsingOutputFormat ( ( OutputFormat < T > ) of ) ; }
Writes a DataStream to the file specified by the path parameter . The writing is performed periodically every millis milliseconds .