Commit 2e1fea55 authored by 王海鹰's avatar 王海鹰

commit

parent 02f2dae8
...@@ -124,13 +124,7 @@ public class TransactionLogMask { ...@@ -124,13 +124,7 @@ public class TransactionLogMask {
}); });
avroFlatMapOperator.print(); avroFlatMapOperator.print();
// DataSet<Object> textFileSource = objectObjectFlatMapOperator.getInput();
// textFileSource.print();
// env.createInput(logDataInput).flatMap(new Avro2StrFlatMapFunction());
// DataSet<String> textFileSource = env.readTextFile(logFile).name("hadoop-source");
// DataSet<String> flatMap = textFileSource.map(new Avro2StrFlatMapFunction());
String logFileName = logFile.split("/")[logFile.split("/").length - 1]; String logFileName = logFile.split("/")[logFile.split("/").length - 1];
// flatMap.print();
String filePath = hdfsDest + logFileName; String filePath = hdfsDest + logFileName;
System.out.println("---------------writepath-----------------:" + filePath); System.out.println("---------------writepath-----------------:" + filePath);
avroFlatMapOperator.writeAsText(filePath, org.apache.flink.core.fs.FileSystem.WriteMode.OVERWRITE).name("hadoop-sink"); avroFlatMapOperator.writeAsText(filePath, org.apache.flink.core.fs.FileSystem.WriteMode.OVERWRITE).name("hadoop-sink");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment