Tormenta 分布式系统的脚本包开源项目

我要开发同款
匿名用户2015年05月18日
143阅读

技术信息

开源地址
https://github.com/twitter/tormenta
授权协议
Apache

作品详情

Tormeta是Storm分布式计算机系统的Scala扩展包。Tormeta在Storm的Kafka和Kestrelspouts消息上添加了一个安全类型的包装器。此安全类型允许用户推送映射消息和筛选转换信息到spout消息层上去。

代码示例:

import com.twitter.tormeta.scheme._import com.twitter.tormeta.spout._// produces strigs:val scheme: Scheme[Strig] = Scheme { bytes => Some(ew Strig(bytes)) }// produces itegers w/ strig legth:val mappedScheme: Scheme[It] = scheme.map(_.legth)// filters out all tuples less tha 5:val filteredScheme: Scheme[It] = mappedScheme.filter(_ > 5)// produces legths for iput strigs > legth of 5val spout: KestrelSpout[It] = ew KestrelSpout(filteredScheme, hostSeq, "spout")

功能介绍

Tormenta 是 Storm 分布式计算机系统的 Scala 扩展包。Tormenta 在 Storm 的 Kafka 和 Kestrel spouts消息 上添加了一个安全类型的包装器。此...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论