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

0 votes

I am working on Scala but but got an error while initializing variable:

This is the way I initialized:

Can someone tell why this error and how to solve?

Jul 24 in Apache Spark by Nitesh

recategorized Jul 24 by Gitika 108 views

1 answer to this question.

0 votes
Hi,

This happens in Scala whenever you won't initialize any value to the variable, you need to initialize a value whenever using any REPL in Scala.
answered Jul 24 by Gitika
• 25,420 points

Related Questions In Apache Spark

0 votes
1 answer
0 votes
1 answer

Can I read a CSV represented as a string into Apache Spark?

You can use the following command. This ...READ MORE

answered May 3, 2018 in Apache Spark by kurt_cobain
• 9,280 points
73 views
0 votes
1 answer

Is it better to have one large parquet file or lots of smaller parquet files?

Ideally, you would use snappy compression (default) ...READ MORE

answered May 23, 2018 in Apache Spark by nitinrawat895
• 10,760 points
2,771 views
0 votes
1 answer

Getting error while connecting zookeeper in Kafka - Spark Streaming integration

I guess you need provide this kafka.bootstrap.servers ...READ MORE

answered May 24, 2018 in Apache Spark by Shubham
• 13,350 points
745 views
0 votes
1 answer

How to execute a function in apache-scala?

Hi, Here is a simple example of how ...READ MORE

answered Jul 1 in Apache Spark by Gitika
• 25,420 points
48 views
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,280 points
268 views
0 votes
2 answers

How do I find all files containing specific text on Linux?

grep -rnw 'text to find recursively inside ...READ MORE

answered May 20 in Linux Administration by Ritesh Singh
6,585 views
0 votes
4 answers

Must read books on programming

Books for different technologies - R - ...READ MORE

answered Jul 18 in Career Counselling by anonymous
• 32,260 points
61 views
0 votes
1 answer

error: identifier expected but ']' found.

Hi, You can try this remove brackets from ...READ MORE

answered Jul 3 in Apache Spark by Gitika
• 25,420 points
162 views
0 votes
1 answer

error: identified expected but integer literal found.

Hi, You can resolve this error with a ...READ MORE

answered Jul 4 in Apache Spark by Gitika
• 25,420 points
167 views