scala> def f1(x:Int):Unit = {
| x match{
| case 1 => println("One")
| case 2 => println("Two")
| case 3 => println("Three")
| case 4 => println("Four")
| case _ => println("Other Number")
| }
| }
f1: (x: Int)Unit
scala> f1(1)
One
scala> f1(2)
Two
scala> f1(_)
res2: Int => Unit = $$Lambda$1067/1853443923@2e1ba142
scala> f1(0)
Other Number
Subscribe to:
Post Comments (Atom)
Flume - Simple Demo
// create a folder in hdfs : $ hdfs dfs -mkdir /user/flumeExa // Create a shell script which generates : Hadoop in real world <n>...
-
Input file: emp.csv ---------------- empno,ename,designation,manager,hire_date,sal,deptno 7788,SCOTT,ANALYST,7566,12/9/1982,3000,20 73...
-
<!-- https://mvnrepository.com/artifact/org.mongodb.spark/mongo-spark-connector --> <dependency> <groupId>org.mong...
-
External table creation in Hive $ cat > sample_1.csv 18282782,NW 1929SEGH2,BSTN 172u8562,PLA 121232,JHK 3443453,AG $ hdfs dfs -...
No comments:
Post a Comment