自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

阿生

天心有晴

  • 博客(4)
  • 资源 (2)
  • 收藏
  • 关注

原创 scala的无参函数什么时候加括号,什么时候不加括号

在scala语言中,没有参数的函数可以加括号也可以不加括号。有什么区别呢?有括号的函数调用时可以加括号也可以不加括号 不带括号的函数调用时一定不能加括号那么具体什么情况下写无参的函数加括号,什么时候不加括号呢?无副作用的函数省略括号有副作用的函数添加括号(提醒使用者需要额外小心)

2017-12-20 11:57:04 3901 3

原创 case关键字在scala的作用

说到scala的强大,case关键字当然功不可没。它可以用作模式匹配 eg:import scala.language.postfixOpsobject fun2{ def main(args: Array[String]): Unit = { val model: Seq[(String, Int)] = ("Jack"->19)::("Bucy"->20)::("Bob"->22)

2017-12-20 11:44:10 6225 2

原创 scala的可堆叠特征

scala中trait可以提高代码的可重用性,假如有很多特质,并且特质中有着重复的方法,那么这是调用的是哪一个特质的方法?请看如下示例 trait T1{ println("T1 is created!") def myprint={ println("T1's my print") } } trait T2{ d

2017-12-12 15:24:42 320

原创 scala中extends和with的使用

在scala中有的时候用extends有的时候用with,到底该用什么呢? 请看下面用例 trait Mytrait1{ def doSomething(str:String):Unit={ println(s"$str is doing") } } trait Mytrait2{ def forfun():Unit

2017-12-11 14:48:05 15947 3

winutils.zip

Failed to locate the winutils binary in the hadoop binary path 如果没有winutil.exe这个文件在运行hadoop程序的时候肯定报错,每次换开发环境都要找一下这个winutil文件,这次打包一下记录下来,从hadoop2.6到hadoop3.0,所有的winutils都在这了

2019-06-12

hadoop,spark,hbase,zookeeper,kafka配置文件

hadoop,spark,hbase,zookeeper,kafka配置文件。 例如: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;?xml-stylesheet type="text/xsl" href="configuration.xsl"?&gt; &lt;!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --&gt; &lt;!-- Put site-specific property overrides in this file. --&gt; <configuration> <property> <name>fs.defaultFS</name> <value>hdfs://master:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>file:/home/bigData/bigdata/hadoop/tmp</value> </property> </configuration>

2017-10-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除