Spark源码的角度思考Scala中的模式匹配

学习了从Spark源码的角度思考Scala中的模式匹配,如case class应用,伴生对象中用apply,所以没有new class,直接进行模式匹配,例子如下

   Case class RegisterWorker(

      Id: string,

      Host: string,

      Port: int,

      Cores:int,

      Memory:int,

      webUiPort:int,

      publicAddress:string,

Extend DeployMessage{

Utils.checkHost(host,”Required hostname”)

Assert(port>0)

}

 王家林亲授《DT大数据梦工厂》大数据实战视频“Scala深入浅出实战经典”视频、音频和PPT下载!第74讲:从Spark源码的角度思考Scala中的模式匹配
百度云:http://pan.baidu.com/s/1hqJByvU
腾讯微云:http://url.cn/chV3CI
360云盘:http://yunpan.cn/cdgz9G35mtADm  访问密码 f551

posted on 2015-08-01 08:28  l_time  阅读(155)  评论(0)    收藏  举报

导航