把你从写繁琐的Map-reduce Job中解放出来,写分布式跟写本地程序没两样,Scala真真代表着先进生产力的方向啊。

好的,今天开始直播基于Scala的Scalding啦,循序渐进地看以下页面:

https://github.com/twitter/scalding#scalding

https://github.com/twitter/scalding/wiki/Getting-Started

https://github.com/willf/scalding_cookbook

看到scalding-cookbook的时候,可以开始尝试写比Word Count更酷的Scalding程序了

 import com.twitter.scalding._
// input (tsv) // 0 1 2 3 4 5 6 // 22 kinds of love nn2 io nn1 // 12 large green eyes jj jj nn2 //
// output (tsv) // 22 of kinds/nn2_love/nn1 // 12 green large/jj_eyes/nn2 class contextCountJob(args : Args) extends Job(args) { val inSchema = ('count, 'w1 ,'w2, 'w3, 'pos1, 'pos2, 'pos3)
val outSchema = ('count, 'word, 'context)
Tsv(args("input"),inSchema) .mapTo(inSchema -> outSchema) { parts : (String, String, String, String, String, String, String) => { val (count, w1, w2, w3, pos1, pos2, pos3) = parts val context = "%s/%s_%s/%s".format(w1,pos1,w3,pos3) (count, w2, context) } } .write(Tsv(args("output"))) }

比较糟糕的是Scala语言新潮到博客园插件都不支持。。。

http://docs.kiji.org/userguides/express/1.0.1/basic-scala-scalding/

http://sujitpal.blogspot.com/2012/08/scalding-for-impatient.html

https://github.com/sujitpal/hia-examples/tree/master/scala/scalding-impatient/src/main/scala/com/mycompany/impatient

https://github.com/twitter/scalding/wiki/Fields-based-API-Reference

https://github.com/twitter/scalding/wiki/Scalding-Sources

https://github.com/twitter/scalding/wiki/Field-rules

https://github.com/twitter/scalding/wiki/API-Reference

https://github.com/twitter/scalding/wiki

http://twitter.github.io/scalding/com/twitter/scalding/package.html

https://github.com/deanwampler/scalding-workshop

推荐Twitter公开课的PPT(此处应有翻墙)

可以对比下其他Hadoop框架

 
 

最新文章

  1. hibernate-cache
  2. UI第十三节——UIActionSheet
  3. Python中的参数
  4. Redis安装和使用
  5. 小甲鱼PE详解之基址重定位详解(PE详解10)
  6. 使用node.js的bodyParser中间件读取post数据解析
  7. Innodb锁机制:Next-Key Lock 浅谈(转)
  8. C# 访问控制:public、private、protected和internal
  9. 【转】C++ 类中的static,const,及引用类型的初始化
  10. freeCMS学习网站
  11. 一个资深java面试官的“面试心得”
  12. Swift - 复杂数据类型说明(数组,字典,结构体,枚举)
  13. lucene全文搜索之二:创建索引器(创建IKAnalyzer分词器和索引目录管理)基于lucene5.5.3
  14. 第八节,Opencv的基本使用------存取图像、视频功能、简单信息标注工具
  15. [HTML]html读取本地文件并显示
  16. 关于测试中哪些信息需要放到jira上面
  17. par函数col参数-控制颜色
  18. 1.Math函数对象
  19. h5前端项目常见问题汇总
  20. 自定义centos7 yum仓库

热门文章

  1. 微信小程序文件结构
  2. 13.KVM安装之网桥
  3. SQL疑难杂症【5 】大量数据查询的时候要考虑结果为空的情况
  4. log4j2的使用
  5. MSDN for VS2012 的安装
  6. PHP-----数组和常见排序算法
  7. js执行顺序<转>
  8. nginx虚拟主机配置
  9. Android 四大组件之三(广播)
  10. VIM 代码折叠