目录
百战程序员,全站22050+开发课程+文档 ,学习精选优质好课快人一步!观看视频 快捷键ALT+N

大数据全系列 教程

1869个小节阅读:467k

收藏
全部开发者教程

408考研

JAVA全系列 教程

面向对象的程序设计语言

Python全系列 教程

Python3.x版本,未来主流的版本

人工智能 教程

顺势而为,AI创新未来

大厂算法 教程

算法,程序员自我提升必经之路

C++ 教程

一门通用计算机编程语言

微服务 教程

目前业界流行的框架组合

web前端全系列 教程

通向WEB技术世界的钥匙

大数据全系列 教程

站在云端操控万千数据

AIGC全能工具班

A

A A

White Night

阅读(186)
赞(0)

FileSystem

1.The file system connector itself is included in Flink and does not require an additional dependency. 文件系统连接器本身包含在 Flink 中,不需要额外的依赖。

2.A corresponding format needs to be specified for reading and writing rows from and to a file system.需要指定相应的格式以从文件系统读取行和向文件系统写入行。

3.The file system connector allows for reading and writing from a local or distributed filesystem. 文件系统连接器允许从本地或分布式文件系统读取和写入

A filesystem table can be defined as:

案例需求:从kafka主题station-topic中读取数据,通过FileSystem Connector写json格式的文件到本地。

添加依赖:

编写Connector FileSystem Sink的SQL DDL语句:

  1. sink.rolling-policy.file-size 接收器滚动策略文件大小
  2. sink.rolling-policy.rollover-interval 接收器滚动策略滚动间隔
  3. sink.rolling-policy.check-interval 检查基于时间的滚动策略的时间间隔
  4. sink.parallelism 将文件写入外部文件系统的并行性。 该值应大于零,否则将抛出异常。

编写程序:

测试:

  1. 运行MakeStationsData类

  2. 运行FileSystemSinkDemo类

  3. 查看结果:

     

北京市昌平区回龙观镇南店村综合商业楼2楼226室

©2014-2023 百战卓越(北京)科技有限公司 All Rights Reserved.

京ICP备14032124号-2