spark 源码里面的sealed trait 存在原因
2016-04-15 16:28
369 查看
//sealed关键字声明其他trait都不能再继承当前的trait//除非这个类与声明的这个trait在同一个class文件里。这样可以保证代码的安全性;
这样做的目的可以保证代码安全性;
@DeveloperApi sealed trait SparkListenerEvent @DeveloperApi case class SparkListenerStageSubmitted(stageInfo: StageInfo, properties: Properties = null) extends SparkListenerEvent @DeveloperApi case class SparkListenerStageCompleted(stageInfo: StageInfo) extends SparkListenerEvent @DeveloperApi case class SparkListenerTaskStart(stageId: Int, stageAttemptId: Int, taskInfo: TaskInfo) extends SparkListenerEvent @DeveloperApi case class SparkListenerTaskGettingResult(taskInfo: TaskInfo) extends SparkListenerEvent
这样做的目的可以保证代码安全性;
相关文章推荐
- 172. Factorial Trailing Zeroes
- 浅谈RAII&智能指针
- UVA_10245_ The Closest Pair Problem
- 调用http://apistore.baidu.com网站的接口
- a、button、input点击出现蓝色边框,如何去掉
- codeforces 652C C. Foe Pairs(尺取法+线段树查询一个区间覆盖线段)
- 进程控制开发[fork() exec exit _exit wait waitpid 守护进程]
- 219. Contains Duplicate II
- 编译过程中,报failed to resolve:com.andriod.databinding.adapters:1.1
- Lesson 3: More About Jobs and Job Details
- textview 计算宽
- CDISC SDTM CM domain 学习笔记
- http://blog.csdn.net/zhou452840622/article/details/41820301
- URLDecoder: Incomplete trailing escape (%) pattern错误处理
- 查找字符串(containsString和rangeOfString的区别)
- CGRectContainsPoint 用法
- 国外braintree支付手段配置以及使用
- xcode7.3 iTunes Store operation failed问题
- arcgis engine 监听element的添加、更新和删除事件(使用IGraphicsContainerEvents)
- Pku oj 1218 THE DRUNK JAILER(开灯问题)