Questions tagged as 'scala'

1
answer

What are the main differences between Kotlin and Scala?

The differences between Kotlin and Java are very clear, such as: More concise (up to 40% code reduction) Null Safety Type Inference Data class Interoperable with Java However, all these features already exist in Scala, a languag...
asked by 07.08.2017 / 21:00
2
answers

Material for study of functional languages: scala, haskell and erlang [closed]

Well, I asked a question recently and it was suspended because it is a matter of opinion of each person, so here I redo my question to be clearer what I want: Someone could please pass me sites or indicate books for learning the following lan...
asked by 05.01.2015 / 20:21
1
answer

Memory leak with Scala and processes (memory leak)

I have a reasonably complex system in Scala, with multiple threads and concurrent system calls. This system has a problem, because busy memory grows over time. From the image below, you can see the memory occupation of the machine over the co...
asked by 14.09.2014 / 17:31
1
answer

What is the Scala Collection equivalent to ConcurrentHashMap?

Hello, how can I implement a ConcurrentHashMap in Scala?     
asked by 02.06.2015 / 22:05
1
answer

What is the difference between Kotlin data class and Scala case class?

In Scala we have case classes , for example: case class Pessoa(nome: String, sobrenome: String) and in Kotlin we have data classes : data class Pessoa( val nome: String, val sobrenome: String ) What's the difference between...
asked by 10.07.2016 / 13:36
1
answer

Stopping a router when your child router terminates

I have Ator that would be Root and this actor Root has a router with 5 instances, and that same router also has a router with 5 instances. How can I stop ArquivoParaProcessar and tell Root that all instances of...
asked by 12.04.2014 / 02:32
2
answers

How to iterate over a huge amount of records with scala sorm

I want to iterate over a lot of records in a table with sorm, but I want to do it in an efficient way in terms of memory. Today I use this code: Db.query[Items].whereEqual("title", someTitle).fetch.foreach { webCount => //do so...
asked by 12.08.2014 / 17:16
1
answer

How to use java.String.format in Scala?

I'm trying to use the .format method of a String. But if I put% 1,% 2, etc. in the string, the java.util.UnknownFormatConversionException exception is thrown by pointing to confusing Java code: private void checkText(String s) { in...
asked by 10.08.2014 / 21:14
2
answers

How to extract json from a jsonp into a string in Scala

I'm using Scala and I have an http response like this: _SS_MainSolrCallbackH( { response: { numFound: 1, start: 0, maxScore: 4.9338827, docs: [ { tipo: "M", id: "mus1933196",a s: 4....
asked by 11.08.2014 / 18:35
0
answers

SparkStreaming consumer Kafka

I'm doing a test with consuming sparkstreaming of a kafka topic. When you start the job it displays the following message: 18/06/06 20:39:25 ERROR ReceiverTracker: Deregistered receiver for stream 0: Restarting receiver with delay 2000ms: Erro...
asked by 07.06.2018 / 02:03