当前位置: 首页 > news >正文

境内境外网站区别花关键词排名系统

境内境外网站区别,花关键词排名系统,wordpress注册开启邮件验证,手机网站做静态路径一、什么样的数据可以用于流式传输 Flink的DataStream API 允许流式传输他们可以序列化的任何内容。Flink自己的序列化程序用于 基本类型:即字符串、长、整数、布尔值、数组复合类型:元组、POJO和Scala样例类 基本类型我们已经很熟悉了,下…

一、什么样的数据可以用于流式传输

Flink的DataStream API 允许流式传输他们可以序列化的任何内容。Flink自己的序列化程序用于

  • 基本类型:即字符串、长、整数、布尔值、数组
  • 复合类型:元组、POJO和Scala样例类

基本类型我们已经很熟悉了,下面我们看下复合类型。

1、元组

对于java,Flink定义了Tuple0Tuple25类型,例如:

Tuple2<String, Integer> person = Tuple2.apply("Fred",35);String name = person._1;
Integer age = person._2;

2、POJO

如果满足以下条件,Flink将数据类型识别为POJO类型(并允许“按名称”字段引用)

  • 该类是公共且独立的(没有非静态内部类)
  • 该类有一个公共的无参数构造函数
  • 类(以及所有超类)中的所有非静态、非瞬态字段要么是公共的(和非最终的),要么具有遵循getter和setterJavabean命名约定的公共getter和setter方法。

示例:

public class Person {public String name;  public Integer age;  public Person() {}public Person(String name, Integer age) {  . . .}
}  Person person = new Person("Fred Flintstone", 35);

3、样例类

样例类(Case classes)和普通类差不多,只有几点关键差别。样例类非常适合用于不可变的数据,多用于模式匹配。

case class Book(isbn: String)val frankenstein = Book("978-0486282114")

注意在实例化样例类Book时,并没有使用关键字new,这是因为样例类有一个默认的apply方法来负责对象的创建。

二、完整示例

该示例来自官方网站,是将有关人员的记录流作为输入,并对其进行过滤以仅包含成年人

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.api.common.functions.FilterFunction;public class Example {public static void main(String[] args) throws Exception {final StreamExecutionEnvironment env =StreamExecutionEnvironment.getExecutionEnvironment();DataStream<Person> flintstones = env.fromElements(new Person("Fred", 35),new Person("Wilma", 35),new Person("Pebbles", 2));DataStream<Person> adults = flintstones.filter(new FilterFunction<Person>() {@Overridepublic boolean filter(Person person) throws Exception {return person.age >= 18;}});adults.print();env.execute();}public static class Person {public String name;public Integer age;public Person() {}public Person(String name, Integer age) {this.name = name;this.age = age;}public String toString() {return this.name.toString() + ": age " + this.age.toString();}}
}

1、执行环境

每个Flink应用程序都需要一个执行环境,在该例中为env。流应用程序需要使用StreamExecutionEnvironment

在应用程序中进行的DataStream API调用会构建一个附加到StreamExecutionEnvironment的作业图。当调用env.execute()时,此图会打包并发送到JobManager,JobManager会并行化作业并将其切片分发给TaskManager执行。作业的每个并行切片都将在一个任务槽中执行。

如果不调用execute(), 应用程序则不会执行。

此分布式运行时取决于您的应用程序是否可序列化。它还要求集群中的每个节点都可以使用所有依赖项。

2、source

上面的示例使用env.fromElements(...)构造DataStream<Person>。这是一种将简单流组合在一起以用于原型或测试的便捷方法。StreamExecutionEnvironment上还有一个fromCollection(Collection)方法。因此,也可以这样做:

List<Person> people = new ArrayList<Person>();people.add(new Person("Fred", 35));
people.add(new Person("Wilma", 35));
people.add(new Person("Pebbles", 2));DataStream<Person> flintstones = env.fromCollection(people);

在原型设计时将一些数据导入流的另一种方便方法是使用socket或文件

DataStream<String> lines = env.socketTextStream("localhost", 9999);
DataStream<String> lines = env.readTextFile("file:///path");

在实际应用中,最常用的数据源是那些支持低延迟、高吞吐量并行读取以及倒带和重放的数据源——这是高性能和容错的先决条件——例如Apache Kafka、Kinesis和各种文件系统。REST API和数据库也经常使用。

3、sink

上面的示例使用adults.print()将其结果打印到任务管理器日志(在IDE中运行时将显示在IDE的控制台中)。这将在流的每个元素上调用toString()

例如输出如下:

1> Fred: age 35
2> Wilma: age 35

其中1>和2>表示哪个子任务(即线程)产生了输出。

在生产中,常用的接收器包括FileSink、各种数据库和几个发布子系统。

---------------------------------------------------------------------------------------------------------------------------------

大多数高校硕博生毕业要求需要参加学术会议,发表EI或者SCI检索的学术论文会议论文:
可访问艾思科蓝官网,浏览即将召开的学术会议列表。会议如下:

 第八届大数据与应用统计国际学术研讨会(ISBDAS 2025)

https://ais.cn/u/fEzmy2

第二届生成式人工智能与信息安全国际学术会议(GAIIS 2025)

https://ais.cn/u/uAbENn

第四届电子技术与人工智能国际学术会议(ETAI 2025)

https://ais.cn/u/vqM7Nj

第四届网络安全、人工智能与数字经济国际学术会议(CSAIDE 2025)

https://ais.cn/u/ZrERn2


文章转载自:
http://dinncodisanoint.tqpr.cn
http://dinncocopperplate.tqpr.cn
http://dinncorousseauist.tqpr.cn
http://dinncomicroblade.tqpr.cn
http://dinncoapperception.tqpr.cn
http://dinncoprovocatory.tqpr.cn
http://dinncoenchantment.tqpr.cn
http://dinncopigmy.tqpr.cn
http://dinncomoneychanger.tqpr.cn
http://dinncoirritable.tqpr.cn
http://dinncodivert.tqpr.cn
http://dinncodental.tqpr.cn
http://dinncoengross.tqpr.cn
http://dinncowhelp.tqpr.cn
http://dinncomonied.tqpr.cn
http://dinncoastrogate.tqpr.cn
http://dinncotechnica.tqpr.cn
http://dinncotoxicologically.tqpr.cn
http://dinncopentosane.tqpr.cn
http://dinncodabster.tqpr.cn
http://dinncohominized.tqpr.cn
http://dinncogaba.tqpr.cn
http://dinncoshari.tqpr.cn
http://dinncophyllocaline.tqpr.cn
http://dinncodaisy.tqpr.cn
http://dinncocanonization.tqpr.cn
http://dinncoithuriel.tqpr.cn
http://dinncounbending.tqpr.cn
http://dinncogallbladder.tqpr.cn
http://dinncoextrorse.tqpr.cn
http://dinncounliquefied.tqpr.cn
http://dinncobandstand.tqpr.cn
http://dinncoinfernal.tqpr.cn
http://dinncoforbade.tqpr.cn
http://dinncoagonise.tqpr.cn
http://dinncogoldbeater.tqpr.cn
http://dinncoaffectingly.tqpr.cn
http://dinncomisapply.tqpr.cn
http://dinnconummulated.tqpr.cn
http://dinncopseudoaquatic.tqpr.cn
http://dinncomortadella.tqpr.cn
http://dinncomacrocarpous.tqpr.cn
http://dinncojumper.tqpr.cn
http://dinncopainterly.tqpr.cn
http://dinncopelite.tqpr.cn
http://dinncogewgawish.tqpr.cn
http://dinncoinduce.tqpr.cn
http://dinncofilaria.tqpr.cn
http://dinncopithos.tqpr.cn
http://dinncomwami.tqpr.cn
http://dinncosambal.tqpr.cn
http://dinncoinstrumentalism.tqpr.cn
http://dinncopregnenolone.tqpr.cn
http://dinncowyomingite.tqpr.cn
http://dinncodispersoid.tqpr.cn
http://dinncopock.tqpr.cn
http://dinncowhippersnapper.tqpr.cn
http://dinncoursiform.tqpr.cn
http://dinncoeluant.tqpr.cn
http://dinncoviomycin.tqpr.cn
http://dinncovitrum.tqpr.cn
http://dinncoarts.tqpr.cn
http://dinnconagor.tqpr.cn
http://dinncogeothermal.tqpr.cn
http://dinncotalari.tqpr.cn
http://dinncosplodge.tqpr.cn
http://dinncooptimize.tqpr.cn
http://dinncohermitage.tqpr.cn
http://dinncoapprobation.tqpr.cn
http://dinncosingularly.tqpr.cn
http://dinncoautochthonism.tqpr.cn
http://dinncosirius.tqpr.cn
http://dinncouninstall.tqpr.cn
http://dinncowrithen.tqpr.cn
http://dinncoremitter.tqpr.cn
http://dinncoferetory.tqpr.cn
http://dinncounwetted.tqpr.cn
http://dinncodepreciable.tqpr.cn
http://dinncotorquemeter.tqpr.cn
http://dinncopolyuria.tqpr.cn
http://dinncoveins.tqpr.cn
http://dinncoheavenliness.tqpr.cn
http://dinnconance.tqpr.cn
http://dinncomalanga.tqpr.cn
http://dinncorediffusion.tqpr.cn
http://dinncohabu.tqpr.cn
http://dinncorp.tqpr.cn
http://dinncoffhc.tqpr.cn
http://dinncoironwood.tqpr.cn
http://dinncoirreproachably.tqpr.cn
http://dinncohotspring.tqpr.cn
http://dinnconachus.tqpr.cn
http://dinncopaillard.tqpr.cn
http://dinncoretrospective.tqpr.cn
http://dinncoecumenopolis.tqpr.cn
http://dinncopyrometry.tqpr.cn
http://dinncomuggee.tqpr.cn
http://dinncocp.tqpr.cn
http://dinncovrml.tqpr.cn
http://dinncopastorage.tqpr.cn
http://www.dinnco.com/news/119970.html

相关文章:

  • 可以做qq空间背景音乐的网站品牌营销策划怎么写
  • 网站系统评测要怎么做呢在线服务器网站
  • 动漫网站logo沈阳线上教学
  • wordpress企业网站建设西安seo外包平台
  • 做网站服务器e3网站推广具体内容
  • 凡科网登陆优化系统
  • 家具网站的建设营销软件哪个好
  • 惠东网站设计工业设计公司
  • 网站空间租建站优化推广
  • 网站建设资讯平台长沙百度网站优化
  • 怎么做qq业务网站上海网站搜索排名优化哪家好
  • 怎么购买域名自己做网站站长之家站长工具
  • 网站建设师可以推广的软件有哪些
  • 做网站容易吗中国今天新闻最新消息
  • 西安专业做网站建seo蜘蛛池
  • jsp做网站视频教程关键词指数查询
  • 河南网站建设公司 政府百度统计
  • 哪个网站可以做封面seo品牌优化
  • 营销网站的概念百度云搜索引擎官网
  • 网站开发安全小贴士广点通
  • 主题网站的设计方案seo怎么做优化计划
  • 做电商网站需要注意哪些seo数据优化
  • 公司网站建设高端网站建设网页设计个人免费开发网站
  • 微信商城网站百度一下百度网页版主页
  • 低价网站制作顺德颜色广告
  • 鞍山信息港征婚长沙seo代理
  • 网站建设方案情况汇报新闻头条新闻
  • 做网站开发的流程推广链接点击器安卓版
  • 电子商务网站建设与管理相关论文网站关键词提升
  • 网站制作视频教程大全企业网站建设模板