52590/code-to-compute-average-in-apache-spark
Hi,
You can compute the average using this code:
def myAvg(x,y): return(x+y)/2.0; avg = myrdd.reduce(myAvg);
I hope this helps.
There are two popular ways using which ...READ MORE
Save it to a text file: line.saveAsTextFile("alicia.txt") Print contains ...READ MORE
Hey, You can follow this below solution for ...READ MORE
Hi@Srinath, It seems you didn't set Hadoop for ...READ MORE
Instead of spliting on '\n'. You should ...READ MORE
Firstly you need to understand the concept ...READ MORE
org.apache.hadoop.mapred is the Old API org.apache.hadoop.mapreduce is the ...READ MORE
Hi, You can create one directory in HDFS ...READ MORE
Hey, You can try this code to get ...READ MORE
Hey, There are few methods provided by the ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.