当前位置:网站首页>何时使用RDD和DataFrame/DataSet
何时使用RDD和DataFrame/DataSet
2022-06-24 07:06:00 【一个不靠谱的程序员】
下面是使用RDD的场景和常见案例:
- 你希望可以对你的数据集进行最基本的转换、处理和控制;
- 你的数据是非结构化的,比如流媒体或者字符流;
- 你不希望像进行列式处理一样定义一个模式,通过名字或字段来处理或访问数据属性;
- 你并不在意通过DataFrame和Dataset进行结构化和半结构化数据处理所能获得的一些优化和性能上的好处;
该什么时候使用DataFrame或Dataset呢?
- 如果你需要丰富的语义、高级抽象和特定领域专用的API,那就使用DataFrame或Dataset;
- 如果你的处理需要对半结构化数据进行高级处理,如filter、map、aggregation、average、sum、SQL查询、列式访问或使用lambda函数,那就使用DataFrame或Dataset;
- 如果你想在编译时就有高度的类型安全,想要有类型的JVM对象,用上Catalyst优化,并得益于Tungsten生成的高效代码,那就使用Dataset;
- 如果你想在不同的Spark库之间使用一致和简化的API,那就使用DataFrame或Dataset;
- 如果你是R语言使用者,就用DataFrame;
- 如果你是Python语言使用者,就用DataFrame,在需要更细致的控制时就退回去使用RDD;
边栏推荐
- 【力扣10天SQL入门】Day2
- 5 minutes, excellent customer service chat handling skills
- Rescue system -- the application of read-write separation
- Cloudbase database migration scheme
- 【团队管理】测试团队绩效管理的25点小建议
- Xtrabackup for data backup
- 利用ngrok做内网穿透
- leetcode 1642. Furthest building you can reach
- 数据库,查询本月借出书的数量,如果高于10本时,显示“本月借出书大于10本”,否则显示“本月借出书小于10本”
- The reason why the qtimer timer does not work
猜你喜欢

ZUCC_编译语言原理与编译_实验08 语法分析 LR 分析

Jenkins自动化部署,连接不到所依赖的服务【已解决】

Send custom events in QT

MATLAB Camera Calibrator相机标定

ZUCC_ Principles of compiling language and compilation_ Experiment 01 language analysis and introduction

ZUCC_ Principles of compiling language and compilation_ Experiment 02 fsharp Ocaml language

Permission model DAC ACL RBAC ABAC

OpenCV to realize the basic transformation of image
![[explain the difference between operation and maintenance and network engineering]](/img/2b/945f468588e729336e2e973e777623.jpg)
[explain the difference between operation and maintenance and network engineering]

Centos7安装jdk8以及mysql5.7以及Navicat连接虚拟机mysql的出错以及解决方法(附mysql下载出错解决办法)
随机推荐
为什么ping不通,而traceroute却可以通
Ordinary token
Qt源码分析--QObject(2)
Battle history between redis and me under billion level traffic
[untitled]
How to improve the customer retention rate in the operation of independent stations? Customer segmentation is very important!
JUC personal simple notes
How to implement approval function in Tekton
日本大阪大学万伟伟研究员介绍基于WRS系统机器人的快速集成方法和应用
win11在cmder中使用vim查看内容的时候空白
Easydss anonymous live channel data volume instability optimization scheme sharing
Using ngrok for intranet penetration
K8S部署高可用postgresql集群 —— 筑梦之路
Matlab求解线性方程组Ax=b
New technology practice, encapsulating the permission application library step by step with the activity results API
Markdown to realize text link jump
Rust procedure macro simply imitates Lombok function
How to configure networkpolicy for nodeport in kubernetes
String转Base64
更改SSH端口号