How to calculate the result of formula with Scala?

0 votes
Can anyone give an example of how to calculate the result of a formula with Scale?
Jul 1, 2019 in Apache Spark by Himanshu

recategorized Jul 4, 2019 by Gitika 217 views

1 answer to this question.

0 votes

Hi,

You can use a simple mathematical calculation to execute and calculate an example and get the result using this example below:

scala> 1+2

You can see this example below and try this in Scala shell:

answered Jul 1, 2019 by Gitika
• 48,320 points

Related Questions In Apache Spark

0 votes
1 answer

How to get the number of elements in partition?

rdd.mapPartitions(iter => Array(iter.size).iterator, true) This command will ...READ MORE

answered May 8, 2018 in Apache Spark by kurt_cobain
• 9,320 points
615 views
0 votes
1 answer
0 votes
1 answer
0 votes
7 answers

How to print the contents of RDD in Apache Spark?

Save it to a text file: line.saveAsTextFile("alicia.txt") Print contains ...READ MORE

answered Dec 10, 2018 in Apache Spark by Akshay
36,182 views
0 votes
2 answers

How to execute a function in apache-scala?

Function Definition : def test():Unit{ var a=10 var b=20 var c=a+b } calling ...READ MORE

answered Aug 5 in Apache Spark by Ramkumar Ramasamy
146 views
0 votes
1 answer

How to write a Scala program in script mode?

Open notepad and add the following code ...READ MORE

answered Nov 16 in Big Data Hadoop by Gitika
• 48,320 points
21 views
0 votes
1 answer

The file exists before processing with hadoop command

Took session and it got resolved. READ MORE

answered Dec 18, 2017 in Big Data Hadoop by Sudhir
• 1,610 points
202 views
0 votes
1 answer

How to sync Hadoop configuration files to multiple nodes?

For syncing Hadoop configuration files, you have ...READ MORE

answered Jun 21, 2018 in Big Data Hadoop by HackTheCode
447 views
0 votes
1 answer

Which syntax to use to take the sum of list of collection in scala?

Hi, You can see this example to get ...READ MORE

answered Jul 5, 2019 in Apache Spark by Gitika
• 48,320 points
502 views
0 votes
1 answer

How can we optimize and minimize the memory when work with scala use case?

Hi, There is a term in Scala that is ...READ MORE

answered Jul 5, 2019 in Apache Spark by Gitika
• 48,320 points
122 views