Scala循环表达式
今天我们来看看Scala的循环表达式。
在很多场景中我们需要将同样的操作执行多次,而一般的顺序执行语句只能执行一次,这就需要使用循环结构来完成,大部分编程语言中都提供了三种主要的循环结构(for、while和do…while),Scala也不例外。
Read more今天我们来看看Scala的循环表达式。
在很多场景中我们需要将同样的操作执行多次,而一般的顺序执行语句只能执行一次,这就需要使用循环结构来完成,大部分编程语言中都提供了三种主要的循环结构(for、while和do…while),Scala也不例外。
Read more众所周知,在早期Spark版本中就已经支持读取Json格式的数据文件,并能够直接转换为数据库表,以方便我们进行处理数据,在本篇文章中我们将介绍如何通过Spark API很简单地读取Json数据,并进一步讲解,读取复杂Json中的嵌套数组。
Read moreAkka is a toolkit and runtime for building highly concurrent,distributed, and resilient message-driven applications on the JVM.
Akka是JVM之上高并发的分布式,可伸缩的消息驱动应用框架。下面我们将通过Akka框架实现多线程的日志收集功能。我们把收集到的日志数据实时存放到HDFS中,以供后续分析挖掘使用。
A different issue that often arises in this situation is that ssh is refusing to log off (“hangs”), since it refuses to lose any data from/to the background job(s).[5][6] This problem can also be overcome by redirecting all three I/O streams
Read more国内关于Spark流处理方面的资料实在是少之又少,开发环境搭建上一些细节上的说明就更少了,本文主要介绍在Windows下通过IntelliJ Idea连接远程服务器的Spark节点,接收FlumeNG收集的日志数据实现实时的数据处理。开发语言为Scala。
Read morespray is an open-source toolkit for building REST/HTTP-based integration layers on top of Scala and Akka. Being asynchronous, actor-based, fast, lightweight, modular and testable it’s a great way to connect your Scala applications to the world.
Read more如Java一样,Scala也有自己的单元测试框架,scalaTest提供了不少单元测试的方法,下面我们来写个例子
Read more