- 博客(9)
- 收藏
- 关注
原创 [2019-04-24] HDFS DFS Command
Usage: hadoop fs [generic options][-appendToFile … ][-cat [-ignoreCrc] …][-checksum …][-chgrp [-R] GROUP PATH…][-chmod [-R] <MODE[,MODE]… | OCTALMODE> PATH…][-chown [-R] [OWNER][:[GROUP...
2019-04-24 19:10:30
127
原创 [2019-04-24] Scala Learning
偏函数:偏函数最大的特点就是它只接受和处理其参数定义域的一个子集,而对于这个子集之外的参数则抛出运行时异常。def main(args:Array[String]): Unit ={ val data = List(1,2,3,4,5,6) data.foreach(println _) // 偏函数 data.foreach(x => println(x)...
2019-04-24 14:37:45
83
原创 [2019-04-23] HDay1
beelinebeeline 是一个命令行形式的jdbc的客户端,是一个连接数据库的工具。 beeline连接的数据库是HiveServer2beeline 工作模式: 内嵌 和 远程a) 内嵌模式中,会运行一个内嵌的Hive(类似于Hive CLI)b) 远程模式中,通过Thrift协议连接到一个不同的HiveServer2。Example:a) beelineb) !...
2019-04-23 16:06:11
83
原创 [2019-04-22] Fifth Day For New Journey
Spark Session:通过静态类Builder来实例化 像是 appName => appName(String name) 用来设置应用程序的名字 之后会在Spark Web UI 中显示。值类型: SparkSession.Builderconfig函数config(SparkConf conf) 根据给定的SparkConf设置配置选项列表config(String k...
2019-04-22 17:56:05
78
原创 [2019-04-18] Fourth Day In New Journey
Scala:val varcase class当一个类被声名为case class的时候,scala会帮助我们做下面几件事情:a) 构造器中的参数如果不被声明为var的话,它默认的话是val类型的,但一般不推荐将构造器中的参数声明为varb) 自动创建伴生对象,同时在里面给我们实现子apply方法,使得我们在使用的时候可以不直接显示地new对象c) 伴生对象中同样会帮我们实现u...
2019-04-18 14:42:30
112
原创 [2019-04-17] Third Day For New Journey
Shellif 语句中的a到z:与:-a,当指定多个条件时,默认为与关系或:-o非:!,这是个单目操作符[ -a FILE ] 如果 FILE 存在则为真。[ -b FILE ] 如果 FILE 存在且是一个块特殊文件则为真。[ -c FILE ] 如果 FILE 存在且是一个字特殊文件则为真。[ -d FILE ] 如果 FILE 存在且是一个目录则为真。[ -e FILE...
2019-04-17 16:40:18
88
原创 [2019-04-04] LeetCode: 4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).You may assume nums1 and num...
2019-04-04 10:08:01
68
原创 [2019-04-03] LeetCode: 3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.Example 1:Input: “abcabcbb”Output: 3Explanation: The answer is “abc”, with the length of 3.Example 2:Input: ...
2019-04-03 22:15:12
89
原创 [2019-04-02] LeetCode: 1. Two Sum
1. Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use...
2019-04-02 17:10:23
135
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人