Trending questions in Apache Spark

0 votes
1 answer

How does Closure function works in Scala?

Hi, A closure in Scala is a function ...READ MORE

Jul 26 in Apache Spark by Gitika
• 25,340 points
24 views
0 votes
1 answer

What is Options in Scala?

Hey, A Scala Option is a kind of ...READ MORE

Jul 26 in Apache Spark by Gitika
• 25,340 points
21 views
0 votes
1 answer

What is a lens in Scala?

Hi, A lens is an abstraction from functional ...READ MORE

Jul 26 in Apache Spark by Gitika
• 25,340 points
23 views
0 votes
1 answer

Query regarding Appending " to a string in Scala

You can perform this task in two ...READ MORE

Jul 10 in Apache Spark by Esha
714 views
0 votes
1 answer

Different types of identifiers in Scala?

Hey, We have four kinds of identifiers in ...READ MORE

Jul 26 in Apache Spark by Gitika
• 25,340 points
20 views
0 votes
1 answer

Scala: CSV file to Save data into HBase

Check the reference code mentioned below: def main(args: ...READ MORE

Jul 25 in Apache Spark by Hari
68 views
0 votes
1 answer

Query regarding Operator Overloading in Scala

All prefix operators' symbols are predefined: +, -, ...READ MORE

Jul 10 in Apache Spark by Karan
688 views
0 votes
1 answer

How to add package com.databricks.spark.avro in spark?

Start spark shell using below line of ...READ MORE

Jul 23 in Apache Spark by Ritu
129 views
0 votes
1 answer

RDD word count with line numbers

df = spark.createDataFrame([("A", 2000), ("A", 2002), ("A", ...READ MORE

Jul 25 in Apache Spark by Siri
34 views
0 votes
1 answer

What is Streams in Scala?

Hi, A stream is a lazy list as ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
32 views
0 votes
1 answer

How to declare Scala array?

Hi, We can declare Scala arrays in two ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
28 views
0 votes
1 answer

What is BitSet in Scala?

Hey, A BitSet is a set of non-negative ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
29 views
0 votes
1 answer

What is exception propagation in Scala?

Hi, When a function experiences an exception, it ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
27 views
0 votes
1 answer

How to create Scala Array with Range?

Hey, The range() method will give us integers ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
23 views
0 votes
1 answer

How to concatinating Arrays in scala?

Hey, We can append a Scala array to ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
22 views
0 votes
1 answer

Load CSV file data inot MySQL

If you are trying to load file ...READ MORE

Jul 25 in Apache Spark by Sita
26 views
0 votes
1 answer

error:error: only classes can have declared but undefined members.

Hi, This happens in Scala whenever you won't ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
64 views
0 votes
1 answer

What is recursion in Scala function? How does it works?

Hey, A Scala function involves recursion when it ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
22 views
0 votes
1 answer

How to process an Array in Scala?

Hi, We can use loop control structures to ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
20 views
0 votes
1 answer

At which point of time Scala will take default arguments?

Hi, If we omit an argument in a ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
20 views
0 votes
1 answer

How to create Scala function using "Def" keyword?

Hi, To create a Scala function, we use ...READ MORE

Jul 25 in Apache Spark by Gitika
• 25,340 points
20 views
0 votes
1 answer

Difference between cogroup and full outer join in spark

Please go through the below explanation : Full ...READ MORE

Jul 13 in Apache Spark by Kiran
523 views
0 votes
1 answer

What is ofDim in Scala?

Hey, ofDim() is a method in Scala that ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
48 views
0 votes
1 answer

How to save RDD in Apache Spark?

Hey, There are few methods provided by the ...READ MORE

Jul 22 in Apache Spark by Gitika
• 25,340 points
122 views
0 votes
1 answer

What is the advantage of having immutability in design for Scala programming language?

Hi, Scala uses immutability by default in most ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
38 views
0 votes
1 answer

How to start spark history server?

Hey, You can use this command to start​ ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
32 views
0 votes
1 answer

What is “Unit” and “()” in Scala?

Hey, Unit is a subtype of scala.anyval and ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
35 views
0 votes
1 answer

Load .xlsx files to hive tables with spark scala

This should work: def readExcel(file: String): DataFrame = ...READ MORE

Jul 22 in Apache Spark by Kishan
118 views
0 votes
1 answer

Which Scala library is used for functional programming?

Hi, Scala library has purely functional data structures ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
29 views
0 votes
1 answer

How is Val different from var in Scala?

Hey, In this language, val is a value and var is ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
28 views
0 votes
1 answer

Explain vararg arguments.

Hey, With varargs, we can pass a variable ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
25 views
0 votes
1 answer

Why do we need App in Scala?

Hey, The app is a helper class that ...READ MORE

Jul 24 in Apache Spark by Gitika
• 25,340 points
24 views
0 votes
1 answer

Load custom delimited file in Spark

Refer to the following code: val sqlContext = ...READ MORE

Jul 24 in Apache Spark by Ritu
29 views
0 votes
1 answer

Create dataframe for Avro file

Yes, we can work with Avro files ...READ MORE

Jul 22 in Apache Spark by Rishi
103 views
0 votes
1 answer

Average function is not commutative and associative?

Hey, I guess the only problem with the ...READ MORE

Jul 22 in Apache Spark by Gitika
• 25,340 points
89 views
0 votes
1 answer

Spark, Scala: Load custom delimited file

You can load a DAT file into ...READ MORE

Jul 16 in Apache Spark by Shri
361 views
0 votes
1 answer

How do I access the Map Task ID in Spark?

You can access task information using TaskContext: import org.apache.spark.TaskContext sc.parallelize(Seq[Int](), ...READ MORE

Jul 23 in Apache Spark by ravikiran
• 4,560 points
45 views
0 votes
1 answer

How to remove the elements with a key present in any other RDD?

Hey, You can use the subtractByKey () function to ...READ MORE

Jul 22 in Apache Spark by Gitika
• 25,340 points
80 views
0 votes
1 answer

Error: Loading data to mysql

You have to use sqoop to export data ...READ MORE

Jul 23 in Apache Spark by Janan
38 views
0 votes
1 answer

How to compute the square root of sum of squares of numbers?

Hey, You need to follow some steps to complete ...READ MORE

Jul 22 in Apache Spark by Gitika
• 25,340 points
63 views
0 votes
1 answer

Spark to Hive Table creation

There's an easier way to achieve your ...READ MORE

Jul 23 in Apache Spark by Dinesh
32 views
0 votes
1 answer

How to check if a particular keyword exists in Apache Spark?

Hey, You can try this code to get ...READ MORE

Jul 22 in Apache Spark by Gitika
• 25,340 points
60 views
0 votes
1 answer

Scala: error: value unary_+ is not a member of (Int, Int)

All prefix operators' symbols are predefined: +, -, ...READ MORE

Jul 22 in Apache Spark by karan
58 views
0 votes
1 answer

How fault tolerance is achieved in Apache Spark?

Hey, In Apache Spark, the data storage model is ...READ MORE

Jul 22 in Apache Spark by Gitika
• 25,340 points
57 views
0 votes
1 answer

Scala: when to use x(2) and x._2?

In the above statement, x(2) is specifying an array ...READ MORE

Jul 22 in Apache Spark by Yogi
54 views
0 votes
1 answer

Spark Null Pointer Exception.

I used Spark 1.5.2 with Hadoop 2.6 ...READ MORE

Jul 19 in Apache Spark by ravikiran
• 4,560 points
185 views
0 votes
1 answer

Appending " to a string in Scala

1) Use the concat() function. Refer to the below ...READ MORE

Jul 23 in Apache Spark by Ritu
21 views
0 votes
1 answer

Explain the for loop for printing the Map values in Scala in Apache Spark?

Hey, You can see this following code to ...READ MORE

Jul 22 in Apache Spark by Gitika
• 25,340 points
41 views
0 votes
1 answer

How to load data of .csv file in MySQL Database Table?

You can do it using a code ...READ MORE

Jul 22 in Apache Spark by Vishwa
38 views