|
|
|
@ -38,6 +38,7 @@ import org.apache.flink.streaming.api.CheckpointingMode; |
|
|
|
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator; |
|
|
|
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; |
|
|
|
import org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink; |
|
|
|
import org.apache.kafka.clients.consumer.OffsetResetStrategy; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.Objects; |
|
|
|
@ -90,7 +91,7 @@ public class RootCloudIotDataFormatterJob { |
|
|
|
).name("MachineIotDataReceivedEvent Sink"); |
|
|
|
|
|
|
|
// 发送到OSS存储 |
|
|
|
String outputPath = "oss://qn-flink-test/root-cloud-model-hw-reported-data"; |
|
|
|
String outputPath = ApolloConfig.get(ConfigConstant.SINK_OSS_PATH); |
|
|
|
StreamingFileSink<MachineIotDataReceivedEvent> sink = StreamingFileSink.forRowFormat( |
|
|
|
new Path(outputPath), |
|
|
|
new SimpleStringEncoder<MachineIotDataReceivedEvent>("UTF-8") |
|
|
|
|