11 2015 档案
摘要:project-->add folder to project
阅读全文
摘要:reduce类函数分析:----------------------------------------------------------------------------待补全-----------------------------------------------------------...
阅读全文
摘要:scala.math.Ordering自定义排序方法。例:(col : Int, row : Int, Value : Double )是一个Tuple3。排序默认按第一项作为Key。Ordering.by[(Int,Int,Double),Int](_._2)表示从Tuple3转到Int型。后面为...
阅读全文
摘要:在我们详细介绍Scala的Case class和模式匹配之前,我们可以通过一个简单的例子来说明一些基本概念。我们设计一个函数库,这个函数库可以用来计算算术表达式,为简单起见,我们设计的算术表达式只侧重于变量,数字,单操作符,和双操作符。我们可以采用如下的Scala类定义:abstract class...
阅读全文
摘要:scala-协变、逆变、上界、下界当我们定义一个协变类型List[A+]时,List[Child]可以是List[Parent]的子类型。当我们定义一个逆变类型List[-A]时,List[Child]可以是List[Parent]的父类型。Scala的协变看下面的例子: class Anim...
阅读全文
摘要:spark中,不论spark-shell还是spark-submit,都可以设置memory大小,但是有的同学会发现有两个memory可以设置。分别是driver memory 和executor memory。从名字上大概可以猜出大概。具体就是说driver memory并不是master分配了多...
阅读全文
摘要:This is the 2nd part of the series. Read the first part here:Logistic Regression Vs Decision Trees Vs SVM: Part IIn this part we’ll discuss how to cho...
阅读全文
摘要:Classification is one of the major problems that we solve while working on standard business problemsacross industries. In this article we’ll be discu...
阅读全文
摘要:I started learning Scala a few days before. Initially i was annoyed by the use of too many symbols in Scala. Especially i was confused by the_and its ...
阅读全文
摘要:1 spark-shell --conf -h 2 Usage: ./bin/spark-shell [options] 3 4 Options: 5 --master MASTER_URL spark://host:port, mesos://host:port, yar...
阅读全文
摘要:执行时需要传入的参数说明如下:Usage: spark-submit [options] [app options]参数名称含义--master MASTER_URL可以是spark://host:port, mesos://host:port, yarn,yarn-cluster,yarn-cl...
阅读全文
摘要:pom中加入以下代码,利用mvn assembly:assembly就可以了。 maven-assembly-plugin ...
阅读全文